/[smeserver]/rpms/smeserver-qpsmtpd/sme7/smeserver-qpsmtpd-1.2.1-peersauth.patch
ViewVC logotype

Annotation of /rpms/smeserver-qpsmtpd/sme7/smeserver-qpsmtpd-1.2.1-peersauth.patch

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


Revision 1.2 - (hide annotations) (download)
Tue Oct 7 15:06:53 2008 UTC (16 years, 1 month ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
New streams

1 slords 1.1 diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/peers mezzanine_patched_smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/peers
2     --- smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/peers 2007-01-11 13:51:37.000000000 -0700
3     +++ mezzanine_patched_smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/peers 2007-01-11 13:51:33.000000000 -0700
4     @@ -46,9 +46,9 @@
5     sub _peer_plugins {
6     my $qp = shift;
7     my $config = shift;
8     + $qp->{hooks} = {};
9     my @plugins = $qp->config($config);
10     - $qp->log(LOGNOTICE, "loading plugins @plugins from $config");
11     -
12     + $qp->log(LOGNOTICE, "loading plugin $_") foreach (@plugins);
13     return $qp->_load_plugins($qp->plugin_dir, @plugins);
14     }
15    
16     @@ -61,13 +61,28 @@
17     while ($client_ip) {
18     if (-f "config/peers/$client_ip") {
19     _peer_plugins($qp, "peers/$client_ip");
20     + $self->register_hook("mail", "verify_auth", 1);
21     return (DECLINED);
22     }
23     $client_ip =~ s/\.?\d+$//; # strip off another 8 bits
24     }
25     if (-f "config/peers/0") {
26     _peer_plugins($qp, "peers/0");
27     + $self->register_hook("mail", "verify_auth", 1);
28     return (DECLINED);
29     }
30     return (DENY);
31     }
32     +
33     +sub verify_auth {
34     + my ( $self, $transaction, $method, $user, $passClear, $passHash, $ticket ) = @_;
35     +
36     + my $qp = $self->qp;
37     +
38     + if ( $qp->auth_mechanism() and $qp->auth_user() )
39     + {
40     + _peer_plugins($qp, "peers/local") if (-f "config/peers/local");
41     + }
42     +
43     + return (DECLINED);
44     +}

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