/[smecontribs]/rpms/smeserver-denyhosts/contribs7/smeserver-denyhosts-2.6-patch2.patch
ViewVC logotype

Diff of /rpms/smeserver-denyhosts/contribs7/smeserver-denyhosts-2.6-patch2.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.2 by slords, Tue Apr 22 18:11:58 2008 UTC Revision 1.3 by unnilennium, Wed Apr 23 23:37:02 2008 UTC
# Line 1  Line 1 
1  --- smeserver-denyhosts-2.6/root/etc/e-smith/web/functions/denyhosts.patch2     2008-03-31 20:10:12.000000000 +0200  --- smeserver-denyhosts-2.6/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/denyhosts.patch2    2008-04-24 01:18:58.000000000 +0200
2  +++ smeserver-denyhosts-2.6/root/etc/e-smith/web/functions/denyhosts    2008-04-22 07:16:09.000000000 +0200  +++ smeserver-denyhosts-2.6/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/denyhosts   2008-04-24 01:12:17.000000000 +0200
3  @@ -20,12 +20,6 @@  @@ -51,4 +51,16 @@
4   our $fm = esmith::FormMagick->new();          <base>ERR_NO_RECORD</base>
5   $fm->parse_xml();          <trans>Unable to locate denyhosts record in configuration db</trans>
6         </entry>
7  -#use Sys::Filesystem ();  +    <entry>
8  -#use FileHandle;  +       <base>SAVE</base>
9  -# use Shell qw (ls cat);  +       <trans>Save</trans>
10  -#use File::Temp  0.12 qw(tempdir);  +    </entry>    
11  -#use File::Basename;  +    <entry>
12  -  +       <base>ENABLED</base>
13   use esmith::cgi;  +       <trans>Enabled</trans>
14   use esmith::config;  +    </entry>
15   use esmith::util;  +    <entry>
16  @@ -104,14 +98,10 @@  +       <base>DISABLED</base>
17    +       <trans>Disabled</trans>
18       print $q->hr;      +    </entry>        
19     </lexicon>
20  -      --- smeserver-denyhosts-2.6/root/etc/e-smith/templates/etc/denyhosts.conf/ADMIN_EMAIL.patch2    2008-04-22 17:07:15.000000000 +0200
21  -    #my @allowedhosts   = `cat /var/lib/denyhosts/allowed-hosts`;  +++ smeserver-denyhosts-2.6/root/etc/e-smith/templates/etc/denyhosts.conf/ADMIN_EMAIL   2008-04-24 00:30:24.000000000 +0200
22  -  @@ -1 +1,5 @@
23    -ADMIN_EMAIL = admin@localhost
24       print $q->h1 ($q->pre ($fm->localise('FM_ALLOWED_HOSTS')));    +{
25    +    my $ADMIN_EMAIL = ( $denyhosts{'AdminEmail'}  || 'admin@localhost');
26       print $q->hr;      +    $OUT="ADMIN_EMAIL = $ADMIN_EMAIL ";
27  -    #print $q->p ($q->pre ("@allowedhosts"));      +
28          +}
29       print "<form name='modif'method='POST' action='denyhosts?state=modify' >";      --- smeserver-denyhosts-2.6/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_FROM.patch2      2008-04-22 17:07:15.000000000 +0200
30        +++ smeserver-denyhosts-2.6/root/etc/e-smith/templates/etc/denyhosts.conf/SMTP_FROM     2008-04-23 23:39:34.000000000 +0200
31  @@ -129,7 +119,7 @@  @@ -1 +1 @@
32       print "      -SMTP_FROM = DenyHosts <nobody@localhost>
33   <SELECT id =\"status\" name=\"status\"><option value =\"$cur_status\">  +SMTP_FROM = DenyHosts <nobody@{"$DomainName";}>
  *$cur_status*</option><option value =\"disabled\">disabled</option>  
 -<option value =\"enabled\">enabled</option</SELECT>" ;            
 +<option value =\"enabled\">enabled</option></SELECT>" ;            
      print " ( ". `service denyhosts status`. " )";  
      print "<br><br>";  
      print_button($fm, 'SAVE');  
 @@ -148,26 +138,25 @@  
      my ($q) = @_;  
      my $ipvalide = ip_number_or_blank($q);  
      my $ip = $q->param ('ip');  
 -    ##esmith::cgi::genHeaderNonCacheable ($q, \%conf, 'Hosts evils');  
 -    #ajout de l'ip si demandé  
 +    #add IP if asked  
      if ( $ipvalide eq 'OK' && defined($ip) && $ip ne ""  )  
         {  
         add_new_valid_from($q);  
 -       # faire un truc en cas de succes  
 +       # add a message if success  
         }  
 -    # suppression des entrées    
 +    # remove entries    
      remove_valid_from($q);  
 -    # mise a jour des templates  
 +    # expand templates  
         # hosts.allow  
         # allowed hosts  
      updatetemplates();  
 -    # modif status + restart service eventuel  
 +    # modify status + restart service  
      updatestatus($q);  
       
      # restart ou stop  
      reloadorstopservice();  
       
 -    #affichage  
 +    #show panel  
      showInitial($q);  
  }  
   
 @@ -191,7 +180,7 @@  
  {  
   `/sbin/e-smith/expand-template /etc/hosts.allow`;  
   
 - `/sbin/e-smith/expand-template /var/lib/denyhosts/allowed-hosts `;  
 + `/sbin/e-smith/expand-template /usr/share/denyhosts/data/allowed-hosts `;  
  }  
   
  sub reloadorstopservice  
 @@ -212,10 +201,6 @@  
  sub show_valid_from_list($)  
  {  
      my $self = shift;  
 -  #  my $q = new CGI;  
 -    #$self->{cgi};  
 -  
 -  
      my @vals = _get_valid_from();  
      if (@vals)  
      {  
 @@ -246,19 +231,14 @@  
   
  sub _get_valid_from  
  {  
 -        #my $self = shift;  
 -  
          my $rec = $db->get('denyhosts');  
 -        #my $rec = db_get_prop(\%conf,'denyhosts','ValidFrom');  
         return undef unless($rec);  
          my @vals = (split ',', ($rec->prop('ValidFrom') || ''));  
 -        #my @vals = (split ',', ($rec || ''));  
         return @vals;  
  }  
   
  sub ip_number_or_blank  
  {  
 -    #my $self = $fm;  
      my $ip = $q->param ('ip');  
   
      if (!defined($ip) || $ip eq "")  
 @@ -273,9 +253,7 @@  
   
  sub add_new_valid_from  
  {  
 -        #my $self = shift;  
 -        #my $q = $_;  
 -  
 +  
          my $ip = $q->param ('ip');  
   
          # do nothing if no network was added  
 @@ -285,7 +263,6 @@  
          unless ($rec)  
          {  
                  return $q->error('ERR_NO_RECORD');  
 -               #$self->error('ERR_NO_RECORD');  
          }  
   
          my $prop = $rec->prop('ValidFrom') || '';  
 @@ -310,9 +287,7 @@  
   
  sub remove_valid_from($)  
  {  
 -        #my $self = shift;  
 -        #my $q = $_;  
 -  
 +  
          my @remove = $q->param('validFromRemove');  
          my @vals = _get_valid_from();  
   
 @@ -320,7 +295,6 @@  
          {  
              return undef unless $entry;  
   
 -           # my ($net) = plit (/\//, $entry);  
   
              unless (@vals)  
              {  


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed