/[smeserver]/rpms/smeserver-qpsmtpd/sme8/smeserver-qpsmtpd-2.2.0-qpsmtpd83.patch
ViewVC logotype

Diff of /rpms/smeserver-qpsmtpd/sme8/smeserver-qpsmtpd-2.2.0-qpsmtpd83.patch

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

Revision 1.1 by slords, Thu Oct 29 20:27:16 2009 UTC Revision 1.3 by slords, Fri Oct 30 00:35:38 2009 UTC
# Line 1  Line 1 
1  diff -up smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers.qpsmtpd83 smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers  diff -up smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers.t smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers
2  --- smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers.qpsmtpd83      2009-10-29 14:03:00.000000000 -0600  --- smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers.t      2008-10-07 09:02:36.000000000 -0600
3  +++ smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers        2009-10-29 14:02:37.000000000 -0600  +++ smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers        2009-10-29 18:34:26.000000000 -0600
4  @@ -54,7 +54,7 @@ sub init {  @@ -54,7 +54,7 @@ sub init {
5              if (-e "$dir/$plugin") {              if (-e "$dir/$plugin") {
6                Qpsmtpd::Plugin->compile($plugin_name, $package,                Qpsmtpd::Plugin->compile($plugin_name, $package,
# Line 10  diff -up smeserver-qpsmtpd-2.0.0/root/us Line 10  diff -up smeserver-qpsmtpd-2.0.0/root/us
10                  unless $plugin_line =~ /logging/;                  unless $plugin_line =~ /logging/;
11                last PLUGIN_DIR;                last PLUGIN_DIR;
12              }              }
13  @@ -69,10 +69,8 @@ sub init {  @@ -69,7 +69,9 @@ sub init {
14   sub _peer_plugins {   sub _peer_plugins {
15      my $qp = shift;      my $qp = shift;
16      my $config = shift;      my $config = shift;
17  -   $qp->{hooks} = {};  -   $qp->{hooks} = {};
18    +
19    +   my $hooks;
20    +   $hooks->{$_} = delete $qp->hooks->{$_} foreach keys %{$qp->hooks};
21    
22      my @plugins = $qp->config($config);      my @plugins = $qp->config($config);
23  -   unshift @plugins, "peers $config";      unshift @plugins, "peers $config";
24      my @loaded;  @@ -79,6 +81,7 @@ sub _peer_plugins {
25          my $this_plugin = $qp->_load_plugin($plugin_line, $qp->plugin_dirs);
26          push @loaded, $this_plugin if $this_plugin;
27        }
28    +   unshift @{$qp->hooks->{connect}}, @{$hooks->{connect}} if exists $hooks->{connect} && $hook eq 'set_hooks';
29    
30      for my $plugin_line (@plugins) {      return @loaded;
31     }
32    @@ -91,13 +94,13 @@ sub hook_set_hooks {
33        my $client_ip = $qp->connection->remote_ip;
34        while ($client_ip) {
35          if (-f "config/peers/$client_ip") {
36    -       _peer_plugins($qp, "peers/$client_ip");
37    +       _peer_plugins($qp, "set_hooks", "peers/$client_ip");
38            return (DECLINED);
39          }
40          $client_ip =~ s/\.?\d+$//; # strip off another 8 bits
41        }
42        if (-f "config/peers/0") {
43    -     _peer_plugins($qp, "peers/0");
44    +     _peer_plugins($qp, "set_hooks", "peers/0");
45          return (DECLINED);
46        }
47        return (DENY);
48    @@ -106,6 +109,6 @@ sub hook_set_hooks {
49     sub hook_valid_auth {
50        my ( $self, $transaction) = @_;
51        my $qp = $self->qp;
52    -   _peer_plugins($qp, "peers/local") if (-f "config/peers/local");
53    +   _peer_plugins($qp, "valid_auth", "peers/local") if (-f "config/peers/local");
54        return (DECLINED);
55     }
56  diff -up smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins.qpsmtpd83 smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins  diff -up smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins.qpsmtpd83 smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins
57  --- smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins.qpsmtpd83   2008-10-07 09:02:36.000000000 -0600  --- smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins.qpsmtpd83   2008-10-07 09:02:36.000000000 -0600
58  +++ smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins     2009-10-29 13:50:03.000000000 -0600  +++ smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins     2009-10-29 13:50:03.000000000 -0600


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