Hi, it' seems I'm the only one in this list.
Ok, so I keep sending more patches (cumulative)
could anyone commit them to branches/0.3x?
They are trivial patches (but without them the branch/0.3x
is not working right)
Maybe there is something more to do in tls area (I didn't try that)
This patch fixes:
* Added "sub disconnect" code to lib/Qpsmtpd/TcpServer/Prefork.pm (without
this, the quit smtp command is not working at all)
* Implemented Taint mode, and warnings
* Added Qpsmtpd::Constants (for Logging), without this, the log module is
getting a string instead of a number. (If you enable warnings, you'll see)
* Added @_ to $self->SUPER::start_connection(@_); in
lib/Qpsmtpd/TcpServer/Prefork.pm
Regards
------------------------------------------------------------------------------
diff -Naur --exclude .svn --exclude config
0.3x.20060724.ORIG/lib/Qpsmtpd/SMTP/Prefork.pm
0.3x.20060724.1/lib/Qpsmtpd/SMTP/Prefork.pm
--- 0.3x.20060724.ORIG/lib/Qpsmtpd/SMTP/Prefork.pm Mon Jul 24 08:33:27 2006
+++ 0.3x.20060724.1/lib/Qpsmtpd/SMTP/Prefork.pm Thu Jul 27 14:55:02 2006
@@ -1,5 +1,6 @@
package Qpsmtpd::SMTP::Prefork;
use Qpsmtpd::SMTP;
+use Qpsmtpd::Constants;
@ISA = qw(Qpsmtpd::SMTP);
sub dispatch {
diff -Naur --exclude .svn --exclude config
0.3x.20060724.ORIG/lib/Qpsmtpd/TcpServer/Prefork.pm
0.3x.20060724.1/lib/Qpsmtpd/TcpServer/Prefork.pm
--- 0.3x.20060724.ORIG/lib/Qpsmtpd/TcpServer/Prefork.pm Mon Jul 24 08:33:27 2006
+++ 0.3x.20060724.1/lib/Qpsmtpd/TcpServer/Prefork.pm Thu Jul 27 14:55:39 2006
@@ -1,6 +1,7 @@
package Qpsmtpd::TcpServer::Prefork;
use Qpsmtpd::TcpServer;
use Qpsmtpd::SMTP::Prefork;
+use Qpsmtpd::Constants;
@ISA = qw(Qpsmtpd::SMTP::Prefork Qpsmtpd::TcpServer);
@@ -12,7 +13,7 @@
#reset info
$self->{_connection} = Qpsmtpd::Connection->new(); #reset connection
$self->{_transaction} = Qpsmtpd::Transaction->new(); #reset transaction
- $self->SUPER::start_connection();
+ $self->SUPER::start_connection(@_);
}
sub read_input {
@@ -53,4 +54,12 @@
return 1;
}
+sub disconnect {
+ my $self = shift;
+ $self->log(LOGDEBUG,"click, disconnecting");
+ $self->SUPER::disconnect(@_);
+ $self->run_hooks("post-connection");
+ die "disconnect_tcpserver";
+}
+
1;
diff -Naur --exclude .svn --exclude config 0.3x.20060724.ORIG/qpsmtpd-prefork
0.3x.20060724.1/qpsmtpd-prefork
--- 0.3x.20060724.ORIG/qpsmtpd-prefork Mon Jul 24 08:33:27 2006
+++ 0.3x.20060724.1/qpsmtpd-prefork Thu Jul 27 15:02:57 2006
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -Tw
# High performance pre-forking qpsmtpd daemon, Copyright (C) 2006 SoftScan
# http://www.softscan.co.uk
#
@@ -96,6 +96,8 @@
'help' => \&usage,
) || &usage;
+if ($user =~ /^([\w\-]+)$/) { $user = $1 } else { &usage }
+
# set max from ip to max number of children if option is set to disabled
$maxconnip = $max_children if ($maxconnip == 0);
@@ -336,7 +338,7 @@
# continue to accept connections until "old age" is reached
for (my $i = 0 ; $i < $child_lifetime ; $i++) {
# accept a connection
- $0 = 'qpsmtpd child'; # set pretty child name in process listing
+ #$0 = 'qpsmtpd child'; # set pretty child name in process listing
my ($client, $iinfo) = $d->accept()
or die
"failed to create new object - $!"; # wait here until client
connects
------------------------------------------------------------------------------
--
Leonardo Helman
Pert Consultores
Argentina
diff -Naur --exclude .svn --exclude config
0.3x.20060724.ORIG/lib/Qpsmtpd/SMTP/Prefork.pm
0.3x.20060724.1/lib/Qpsmtpd/SMTP/Prefork.pm
--- 0.3x.20060724.ORIG/lib/Qpsmtpd/SMTP/Prefork.pm Mon Jul 24 08:33:27 2006
+++ 0.3x.20060724.1/lib/Qpsmtpd/SMTP/Prefork.pm Thu Jul 27 14:55:02 2006
@@ -1,5 +1,6 @@
package Qpsmtpd::SMTP::Prefork;
use Qpsmtpd::SMTP;
+use Qpsmtpd::Constants;
@ISA = qw(Qpsmtpd::SMTP);
sub dispatch {
diff -Naur --exclude .svn --exclude config
0.3x.20060724.ORIG/lib/Qpsmtpd/TcpServer/Prefork.pm
0.3x.20060724.1/lib/Qpsmtpd/TcpServer/Prefork.pm
--- 0.3x.20060724.ORIG/lib/Qpsmtpd/TcpServer/Prefork.pm Mon Jul 24 08:33:27 2006
+++ 0.3x.20060724.1/lib/Qpsmtpd/TcpServer/Prefork.pm Thu Jul 27 14:55:39 2006
@@ -1,6 +1,7 @@
package Qpsmtpd::TcpServer::Prefork;
use Qpsmtpd::TcpServer;
use Qpsmtpd::SMTP::Prefork;
+use Qpsmtpd::Constants;
@ISA = qw(Qpsmtpd::SMTP::Prefork Qpsmtpd::TcpServer);
@@ -12,7 +13,7 @@
#reset info
$self->{_connection} = Qpsmtpd::Connection->new(); #reset connection
$self->{_transaction} = Qpsmtpd::Transaction->new(); #reset transaction
- $self->SUPER::start_connection();
+ $self->SUPER::start_connection(@_);
}
sub read_input {
@@ -53,4 +54,12 @@
return 1;
}
+sub disconnect {
+ my $self = shift;
+ $self->log(LOGDEBUG,"click, disconnecting");
+ $self->SUPER::disconnect(@_);
+ $self->run_hooks("post-connection");
+ die "disconnect_tcpserver";
+}
+
1;
diff -Naur --exclude .svn --exclude config 0.3x.20060724.ORIG/qpsmtpd-prefork
0.3x.20060724.1/qpsmtpd-prefork
--- 0.3x.20060724.ORIG/qpsmtpd-prefork Mon Jul 24 08:33:27 2006
+++ 0.3x.20060724.1/qpsmtpd-prefork Thu Jul 27 15:02:57 2006
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -Tw
# High performance pre-forking qpsmtpd daemon, Copyright (C) 2006 SoftScan
# http://www.softscan.co.uk
#
@@ -96,6 +96,8 @@
'help' => \&usage,
) || &usage;
+if ($user =~ /^([\w\-]+)$/) { $user = $1 } else { &usage }
+
# set max from ip to max number of children if option is set to disabled
$maxconnip = $max_children if ($maxconnip == 0);
@@ -336,7 +338,7 @@
# continue to accept connections until "old age" is reached
for (my $i = 0 ; $i < $child_lifetime ; $i++) {
# accept a connection
- $0 = 'qpsmtpd child'; # set pretty child name in process listing
+ #$0 = 'qpsmtpd child'; # set pretty child name in process listing
my ($client, $iinfo) = $d->accept()
or die
"failed to create new object - $!"; # wait here until client
connects