1 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-base-4.18.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/remoteaccess mezzanine_patched_e-smith-base-4.18.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/remoteaccess |
2 |
--- e-smith-base-4.18.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/remoteaccess 2005-11-20 21:28:05.000000000 -0700 |
3 |
+++ mezzanine_patched_e-smith-base-4.18.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/remoteaccess 2007-04-14 09:01:15.000000000 -0600 |
4 |
@@ -80,6 +80,10 @@ |
5 |
<trans>Number of PPTP clients</trans> |
6 |
</entry> |
7 |
<entry> |
8 |
+ <base>LABEL_SSH_PORT</base> |
9 |
+ <trans>TCP Port for secure shell access</trans> |
10 |
+ </entry> |
11 |
+ <entry> |
12 |
<base>LABEL_SSH</base> |
13 |
<trans>Secure shell access</trans> |
14 |
</entry> |
15 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-base-4.18.0/root/etc/e-smith/web/functions/remoteaccess mezzanine_patched_e-smith-base-4.18.0/root/etc/e-smith/web/functions/remoteaccess |
16 |
--- e-smith-base-4.18.0/root/etc/e-smith/web/functions/remoteaccess 2005-11-20 21:28:10.000000000 -0700 |
17 |
+++ mezzanine_patched_e-smith-base-4.18.0/root/etc/e-smith/web/functions/remoteaccess 2007-04-14 09:04:21.000000000 -0600 |
18 |
@@ -22,9 +22,6 @@ |
19 |
# You should have received a copy of the GNU General Public License |
20 |
# along with this program; if not, write to the Free Software |
21 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 |
-# |
23 |
-# Technical support for this program is available from Mitel Networks |
24 |
-# Please visit our web site www.mitel.com/sme/ for details. |
25 |
#---------------------------------------------------------------------- |
26 |
|
27 |
use strict; |
28 |
@@ -62,6 +59,7 @@ |
29 |
ok ($ua->{form}->find_input('FTPAccess'), 'Finding the FTPAccess field'); |
30 |
ok ($ua->{form}->find_input('sshAccess'), 'Finding the sshAccess field'); |
31 |
ok ($ua->{form}->find_input('sshPermitRootLogin'), 'Finding the sshPermitRootLogin field'); |
32 |
+ok ($ua->{form}->find_input('sshTCPPort'), 'Finding the sshTCPPort field'); |
33 |
ok ($ua->{form}->find_input('pptpSessions'), 'Finding the pptpSessions field'); |
34 |
ok ($ua->{form}->find_input('sshPasswordAuthentication'), 'Finding the sshPasswordAuthentication field'); |
35 |
ok ($ua->{form}->find_input('FTPLimits'), 'Finding the FTPLimits field'); |
36 |
@@ -71,6 +69,7 @@ |
37 |
$ua->field('FTPAccess' => 'private'); |
38 |
$ua->field('sshAccess' => 'public'); |
39 |
$ua->field('sshPermitRootLogin' => 'yes'); |
40 |
+ $ua->field('sshTCPPort' => '22'); |
41 |
$ua->field('pptpSessions' => '10'); |
42 |
$ua->field('sshPasswordAuthentication' => 'yes'); |
43 |
$ua->field('FTPLimits' => 'normal'); |
44 |
@@ -92,7 +91,7 @@ |
45 |
is($db->get('sshd')->prop('access'), 'public', "We have public ssh"); |
46 |
is($db->get('sshd')->prop('PasswordAuthentication'), 'yes', "We have password auth"); |
47 |
is($db->get('sshd')->prop('PermitRootLogin'), 'yes', "We have root login"); |
48 |
- |
49 |
+ is($db->get('sshd')->prop('TCPPort'), '22', "Got the right tcp port for ssh'); |
50 |
is($db->get('sshd')->prop('status'), 'enabled', "ssh is enabled"); |
51 |
|
52 |
is ($db->get('ftp')->prop('access'), 'private', "ftp access is private"); |
53 |
@@ -150,6 +149,11 @@ |
54 |
value="get_ssh_password_auth()"> |
55 |
<label>LABEL_SSH_PASSWORD_ACCESS</label> |
56 |
</field> |
57 |
+ <field type="text" id="sshTCPPort" size="5" |
58 |
+ validation="zero_or_positive" |
59 |
+ value="get_ssh_port()"> |
60 |
+ <label>LABEL_SSH_PORT</label> |
61 |
+ </field> |
62 |
|
63 |
<subroutine src="show_ftp_section()"/> |
64 |
|
65 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-base-4.18.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/remoteaccess.pm mezzanine_patched_e-smith-base-4.18.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/remoteaccess.pm |
66 |
--- e-smith-base-4.18.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/remoteaccess.pm 2007-04-14 09:05:38.000000000 -0600 |
67 |
+++ mezzanine_patched_e-smith-base-4.18.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/remoteaccess.pm 2007-04-14 08:59:38.000000000 -0600 |
68 |
@@ -199,6 +199,17 @@ |
69 |
} |
70 |
} |
71 |
|
72 |
+=head2 get_ssh_port |
73 |
+ |
74 |
+Get the tcp port defined in the TCPPort propery |
75 |
+in the sshd config file variable |
76 |
+ |
77 |
+=cut |
78 |
+ |
79 |
+sub get_ssh_port |
80 |
+{ |
81 |
+ return(get_prop('$self','sshd','TCPPort') || '22'); |
82 |
+} |
83 |
|
84 |
=head2 get_ftp_password_login_access |
85 |
|
86 |
@@ -606,6 +617,7 @@ |
87 |
my $sshaccess = ($q->param ('sshAccess') || 'off'); |
88 |
my $sshPermitRootLogin = ($q->param ('sshPermitRootLogin') || 'no'); |
89 |
my $sshPasswordAuthentication = ($q->param ('sshPasswordAuthentication') || 'no'); |
90 |
+ my $sshTCPPort = ($q->param ('sshTCPPort') || '22'); |
91 |
my $ftplogin = ($q->param ('FTPPasswordLogin') || 'private'); |
92 |
my $ftpaccess = ($q->param ('FTPAccess') || 'off'); |
93 |
my $pptpSessions = ($q->param ('pptpSessions') || '0'); |
94 |
@@ -630,7 +642,7 @@ |
95 |
} |
96 |
|
97 |
$rec = $db->get('sshd') || $db->new_record('sshd', {type => 'service'}); |
98 |
- |
99 |
+ $rec->set_prop('TCPPort', $sshTCPPort); |
100 |
$rec->set_prop('status', ($sshaccess eq "off" ? 'disabled' : 'enabled')); |
101 |
$rec->set_prop('access', $sshaccess); |
102 |
$rec->set_prop('PermitRootLogin', $sshPermitRootLogin); |