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
--- 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
+++ 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
@@ -80,6 +80,10 @@
Number of PPTP clients
+ LABEL_SSH_PORT
+ TCP Port for secure shell access
+
+
LABEL_SSH
Secure shell access
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
--- e-smith-base-4.18.0/root/etc/e-smith/web/functions/remoteaccess 2005-11-20 21:28:10.000000000 -0700
+++ mezzanine_patched_e-smith-base-4.18.0/root/etc/e-smith/web/functions/remoteaccess 2007-04-14 09:04:21.000000000 -0600
@@ -22,9 +22,6 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Technical support for this program is available from Mitel Networks
-# Please visit our web site www.mitel.com/sme/ for details.
#----------------------------------------------------------------------
use strict;
@@ -62,6 +59,7 @@
ok ($ua->{form}->find_input('FTPAccess'), 'Finding the FTPAccess field');
ok ($ua->{form}->find_input('sshAccess'), 'Finding the sshAccess field');
ok ($ua->{form}->find_input('sshPermitRootLogin'), 'Finding the sshPermitRootLogin field');
+ok ($ua->{form}->find_input('sshTCPPort'), 'Finding the sshTCPPort field');
ok ($ua->{form}->find_input('pptpSessions'), 'Finding the pptpSessions field');
ok ($ua->{form}->find_input('sshPasswordAuthentication'), 'Finding the sshPasswordAuthentication field');
ok ($ua->{form}->find_input('FTPLimits'), 'Finding the FTPLimits field');
@@ -71,6 +69,7 @@
$ua->field('FTPAccess' => 'private');
$ua->field('sshAccess' => 'public');
$ua->field('sshPermitRootLogin' => 'yes');
+ $ua->field('sshTCPPort' => '22');
$ua->field('pptpSessions' => '10');
$ua->field('sshPasswordAuthentication' => 'yes');
$ua->field('FTPLimits' => 'normal');
@@ -92,7 +91,7 @@
is($db->get('sshd')->prop('access'), 'public', "We have public ssh");
is($db->get('sshd')->prop('PasswordAuthentication'), 'yes', "We have password auth");
is($db->get('sshd')->prop('PermitRootLogin'), 'yes', "We have root login");
-
+ is($db->get('sshd')->prop('TCPPort'), '22', "Got the right tcp port for ssh');
is($db->get('sshd')->prop('status'), 'enabled', "ssh is enabled");
is ($db->get('ftp')->prop('access'), 'private', "ftp access is private");
@@ -150,6 +149,11 @@
value="get_ssh_password_auth()">
+
+
+
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
--- 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
+++ 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
@@ -199,6 +199,17 @@
}
}
+=head2 get_ssh_port
+
+Get the tcp port defined in the TCPPort propery
+in the sshd config file variable
+
+=cut
+
+sub get_ssh_port
+{
+ return(get_prop('$self','sshd','TCPPort') || '22');
+}
=head2 get_ftp_password_login_access
@@ -606,6 +617,7 @@
my $sshaccess = ($q->param ('sshAccess') || 'off');
my $sshPermitRootLogin = ($q->param ('sshPermitRootLogin') || 'no');
my $sshPasswordAuthentication = ($q->param ('sshPasswordAuthentication') || 'no');
+ my $sshTCPPort = ($q->param ('sshTCPPort') || '22');
my $ftplogin = ($q->param ('FTPPasswordLogin') || 'private');
my $ftpaccess = ($q->param ('FTPAccess') || 'off');
my $pptpSessions = ($q->param ('pptpSessions') || '0');
@@ -630,7 +642,7 @@
}
$rec = $db->get('sshd') || $db->new_record('sshd', {type => 'service'});
-
+ $rec->set_prop('TCPPort', $sshTCPPort);
$rec->set_prop('status', ($sshaccess eq "off" ? 'disabled' : 'enabled'));
$rec->set_prop('access', $sshaccess);
$rec->set_prop('PermitRootLogin', $sshPermitRootLogin);