Compare commits
	
		
			3 Commits
		
	
	
		
			11_0_0-74_
			...
			11_0_0-77_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| accf96df0d | |||
| 1c601f0ace | |||
| cffbe53fb4 | 
@@ -215,6 +215,7 @@ sub add_portforward {
 | 
			
		||||
 | 
			
		||||
sub get_destination_host {
 | 
			
		||||
    my $q           = shift;
 | 
			
		||||
	$cdb = esmith::ConfigDB->open || die "Can't open configuration database: $!\n";
 | 
			
		||||
    my $dhost       = $q->param("dhost");
 | 
			
		||||
    my $localip     = $cdb->get_prop('InternalInterface', 'IPAddress');
 | 
			
		||||
    my $external_ip = $cdb->get_prop('ExternalInterface', 'IPAddress') || $localip;
 | 
			
		||||
@@ -361,6 +362,7 @@ sub isValidPort() {
 | 
			
		||||
 | 
			
		||||
sub validate_destination_host {
 | 
			
		||||
    my $c     = shift;
 | 
			
		||||
	$cdb = esmith::ConfigDB->open || die "Can't open configuration database: $!\n";
 | 
			
		||||
    my $dhost = $c->param('dhost');
 | 
			
		||||
    $dhost =~ s/^\s+|\s+$//g;
 | 
			
		||||
    my $localip = $cdb->get_prop('InternalInterface', 'IPAddress');
 | 
			
		||||
 
 | 
			
		||||
@@ -30,7 +30,7 @@ our @EXPORT = qw( networkAccess_list passwordLogin_list get_ssh_permit_root_logi
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
#		get_pptp_sessions
 | 
			
		||||
our $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
my  $db; # = esmith::ConfigDB->open || warn "Couldn't open configuration database"; 
 | 
			
		||||
 | 
			
		||||
sub main {
 | 
			
		||||
    my $c = shift;
 | 
			
		||||
@@ -134,7 +134,7 @@ sub networkAccess_list {
 | 
			
		||||
    return [
 | 
			
		||||
        [ $c->l('rma_NO_ACCESS')         => 'off' ],
 | 
			
		||||
        [ $c->l('NETWORKS_ALLOW_LOCAL')  => 'private' ],
 | 
			
		||||
        [ $c->l('NETWORKS_ALLOW_PUBLIC') => 'normal' ]
 | 
			
		||||
        [ $c->l('NETWORKS_ALLOW_PUBLIC') => 'public' ]
 | 
			
		||||
    ];
 | 
			
		||||
} ## end sub networkAccess_list
 | 
			
		||||
 | 
			
		||||
@@ -144,6 +144,7 @@ sub passwordLogin_list {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub get_prop {
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
    my ($c, $item, $prop) = @_;
 | 
			
		||||
    warn "You must specify a record key"    unless $item;
 | 
			
		||||
    warn "You must specify a property name" unless $prop;
 | 
			
		||||
@@ -154,6 +155,8 @@ sub get_prop {
 | 
			
		||||
sub get_value {
 | 
			
		||||
    my $c    = shift;
 | 
			
		||||
    my $item = shift;
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
    return ($db->get($item)->value());
 | 
			
		||||
} ## end sub get_value
 | 
			
		||||
 | 
			
		||||
@@ -179,8 +182,8 @@ sub get_ssh_password_auth {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub get_ssh_access {
 | 
			
		||||
    my $status = get_prop('', 'sshd', 'status');
 | 
			
		||||
 | 
			
		||||
	my $c = shift;
 | 
			
		||||
    my $status = $c->get_prop('sshd', 'status');
 | 
			
		||||
    if (defined($status) && ($status eq 'enabled')) {
 | 
			
		||||
        my $access = get_prop('', 'sshd', 'access');
 | 
			
		||||
        $access = ($access eq 'public') ? 'public' : 'private';
 | 
			
		||||
@@ -202,6 +205,7 @@ sub get_ftp_password_login_access {
 | 
			
		||||
} ## end sub get_ftp_password_login_access
 | 
			
		||||
 | 
			
		||||
sub get_telnet_mode {
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
    my $telnet = $db->get('telnet');
 | 
			
		||||
    return ('off') unless $telnet;
 | 
			
		||||
    my $status = $telnet->prop('status') || 'disabled';
 | 
			
		||||
@@ -211,8 +215,8 @@ sub get_telnet_mode {
 | 
			
		||||
} ## end sub get_telnet_mode
 | 
			
		||||
 | 
			
		||||
sub get_ipsecrw_sessions {
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
    my $status = $db->get('ipsec')->prop('RoadWarriorStatus');
 | 
			
		||||
 | 
			
		||||
    if (defined($status) && ($status eq 'enabled')) {
 | 
			
		||||
        return ($db->get('ipsec')->prop('RoadWarriorSessions') || '0');
 | 
			
		||||
    } else {
 | 
			
		||||
@@ -221,6 +225,7 @@ sub get_ipsecrw_sessions {
 | 
			
		||||
} ## end sub get_ipsecrw_sessions
 | 
			
		||||
 | 
			
		||||
sub get_ipsecrw_status {
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
    return undef unless ($db->get('ipsec'));
 | 
			
		||||
    return $db->get('ipsec')->prop('RoadWarriorStatus');
 | 
			
		||||
}
 | 
			
		||||
@@ -228,6 +233,7 @@ sub get_ipsecrw_status {
 | 
			
		||||
sub pptp_and_dhcp_range {
 | 
			
		||||
    my $c           = shift;
 | 
			
		||||
    my $val         = shift || 0;
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
    my $dhcp_status = $db->get_prop('dhcpd', 'status') || 'disabled';
 | 
			
		||||
    my $dhcp_end    = $db->get_prop('dhcpd', 'end') || '';
 | 
			
		||||
    my $dhcp_start  = $db->get_prop('dhcpd', 'start') || '';
 | 
			
		||||
@@ -245,6 +251,7 @@ sub pptp_and_dhcp_range {
 | 
			
		||||
 | 
			
		||||
sub _get_valid_from {
 | 
			
		||||
    my $c   = shift;
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
    my $rec = $db->get('httpd-admin');
 | 
			
		||||
    return undef unless ($rec);
 | 
			
		||||
    my @vals = (split ',', ($rec->prop('ValidFrom') || ''));
 | 
			
		||||
@@ -287,12 +294,12 @@ sub validate_network_and_mask {
 | 
			
		||||
 | 
			
		||||
sub change_settings {
 | 
			
		||||
    my ($c, %rma_datas) = @_;
 | 
			
		||||
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
    #------------------------------------------------------------
 | 
			
		||||
    # good; go ahead and change the access.
 | 
			
		||||
    #------------------------------------------------------------
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
    my $rec = $db->get('telnet');
 | 
			
		||||
 | 
			
		||||
    if ($rec) {
 | 
			
		||||
        if ($rma_datas{telnetAccess} eq "off") {
 | 
			
		||||
            $rec->set_prop('status', 'disabled');
 | 
			
		||||
@@ -363,7 +370,7 @@ sub change_settings {
 | 
			
		||||
sub set_ipsecrw_sessions {
 | 
			
		||||
    my $c        = shift;
 | 
			
		||||
    my $sessions = shift;
 | 
			
		||||
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
    if (defined $sessions) {
 | 
			
		||||
        $db->get('ipsec')->set_prop('RoadWarriorSessions', $sessions);
 | 
			
		||||
 | 
			
		||||
@@ -378,6 +385,7 @@ sub add_new_valid_from {
 | 
			
		||||
    my $c    = shift;
 | 
			
		||||
    my $net  = shift;
 | 
			
		||||
    my $mask = shift;
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
 | 
			
		||||
    # we transform bit mask to regular mask
 | 
			
		||||
    $mask = get_reg_mask($net, $mask);
 | 
			
		||||
@@ -400,6 +408,7 @@ sub remove_valid_from {
 | 
			
		||||
    my $c           = shift;
 | 
			
		||||
    my $remove_nets = shift;
 | 
			
		||||
    my @remove      = split /,/, $remove_nets;
 | 
			
		||||
    $db = esmith::ConfigDB->open || warn "Couldn't open configuration database";
 | 
			
		||||
 | 
			
		||||
    #	my @remove = $c->param('Remove_nets');
 | 
			
		||||
    my @vals = $c->_get_valid_from();
 | 
			
		||||
@@ -430,4 +439,4 @@ sub remove_valid_from {
 | 
			
		||||
    $db->get('httpd-admin')->set_prop('ValidFrom', $prop);
 | 
			
		||||
    return 1;
 | 
			
		||||
} ## end sub remove_valid_from
 | 
			
		||||
1;
 | 
			
		||||
1;
 | 
			
		||||
@@ -1,16 +1,11 @@
 | 
			
		||||
package SrvMngr::Controller::Review;
 | 
			
		||||
 | 
			
		||||
#----------------------------------------------------------------------
 | 
			
		||||
# heading     : Support
 | 
			
		||||
# heading     : Investigation
 | 
			
		||||
# description : Review configuration
 | 
			
		||||
# navigation  : 000 500
 | 
			
		||||
# menu        : N
 | 
			
		||||
# navigation  : 6000 6800
 | 
			
		||||
# routes : end
 | 
			
		||||
#----------------------------------------------------------------------
 | 
			
		||||
# heading-o     : Configuration
 | 
			
		||||
# description-o : Review configuration
 | 
			
		||||
# navigation-o  : 6000 6800
 | 
			
		||||
#----------------------------------------------------------------------
 | 
			
		||||
use strict;
 | 
			
		||||
use warnings;
 | 
			
		||||
use Mojo::Base 'Mojolicious::Controller';
 | 
			
		||||
@@ -313,4 +308,4 @@ sub get_public_ip_address
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
1;
 | 
			
		||||
1;
 | 
			
		||||
@@ -497,4 +497,9 @@ div.success, span.success {
 | 
			
		||||
     border-color: #006400 ;
 | 
			
		||||
     padding: 10px;
 | 
			
		||||
     border-radius: 10px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
div.roundcube #roundcube{
 | 
			
		||||
	width:100%;
 | 
			
		||||
	height:600px;
 | 
			
		||||
}
 | 
			
		||||
@@ -2,7 +2,7 @@ Summary: Sme server  navigation module : manager 2
 | 
			
		||||
%define name smeserver-manager
 | 
			
		||||
Name: %{name}
 | 
			
		||||
%define version 11.0.0
 | 
			
		||||
%define release 74
 | 
			
		||||
%define release 77
 | 
			
		||||
Version: %{version}
 | 
			
		||||
Release: %{release}%{?dist}
 | 
			
		||||
License: GPL
 | 
			
		||||
@@ -143,6 +143,17 @@ true
 | 
			
		||||
%defattr(-,root,root)
 | 
			
		||||
 | 
			
		||||
%changelog
 | 
			
		||||
* Sat Apr 12 2025 Brian Read <brianr@koozali.org> 11.0.0-77.sme
 | 
			
		||||
- Sort out local and pulic access setting in remote panel  [SME: 12988]
 | 
			
		||||
- caching problem, plus confusion between normal and public setting in sshd / access in DB
 | 
			
		||||
 | 
			
		||||
* Fri Apr 11 2025 Brian Read <brianr@koozali.org> 11.0.0-76.sme
 | 
			
		||||
- Restore css for roundcube embedded  [SME: 12987]
 | 
			
		||||
 | 
			
		||||
* Wed Apr 09 2025 Brian Read <brianr@koozali.org> 11.0.0-75.sme
 | 
			
		||||
- Move review configuration to behind login [SME: 12984]
 | 
			
		||||
- Fix crash in port forwarding [SME: 12985]
 | 
			
		||||
 | 
			
		||||
* Wed Mar 26 2025 Brian Read <brianr@koozali.org> 11.0.0-74.sme
 | 
			
		||||
- Fix error message and success message format in Local Networking panel [SME: 12969]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user