[vchkpw] Re: SMTP Auth HOW? *UPDATE* AMD64

2004-05-25 Thread Peter Palmreuther
Hello Blist,

On Monday, May 24, 2004 at 11:16:58 PM you wrote (at least in part):

 10092 write(4, [EMAIL PROTECTED], 27) = 27

However your Base64-encoded your login data, something went wrong.
There's a '\n' that shouldn't be there.

The correct B64-data would be:

Username: YnJvb2tzQGJyb29rc3JveS5jb20=
Password: amo=

Please try again with these data and report in.
-- 
Best regards
Peter Palmreuther

I have been guilty of kicking myself in the teeth...



Re: [vchkpw] Re: SMTP Auth HOW? *UPDATE* AMD64

2004-05-25 Thread blist
Peter Palmreuther wrote:
However your Base64-encoded your login data, something went wrong.
There's a '\n' that shouldn't be there.
The correct B64-data would be:
Username: YnJvb2tzQGJyb29rc3JveS5jb20=
Password: amo=
Please try again with these data and report in.
 

Peter,
After tyring with these values I get:
ps1:/tmp # tail -f qmail.log
24162 write(2, tcpserver: status: 0/20\n, 24) = 24
24162 write(2, tcpserver: status: 1/20\n, 24) = 24
24403 write(2, tcpserver: pid 24403 from 192.168.5.50\n, 39) = 39
24403 write(2, tcpserver: ok 24403 0:192.168.5.50:25 
:192.168.5.50::32838\n, 59) = 59
24403 write(1, 220 box.prostream.net ESMTP\r\n, 29) = 29
24403 write(1, 
250-box.prostream.net\r\n250-PIPELINING\r\n250-8BITMIME\r\n250 AUTH 
LOGIN PLAIN CRAM-MD5\r\n, 84) = 84
24403 write(1, 334 VXNlcm5hbWU6\r\n, 18) = 18
24403 write(1, 334 UGFzc3dvcmQ6\r\n, 18) = 18
24403 write(4, [EMAIL PROTECTED], 25) = 25
24597 write(4, \33\0\0\1\215 \0\0\0root\0[_O\\SRHM\0vpopmail, 31) = 31
24597 write(4, \240\0\0\0\3select pw_name, pw_passwd, pw_uid, pw_gid, 
pw_gecos, pw_dir, pw_shell , pw_clear_passwd from vpopmail where pw_name 
= \brooks\ and pw_domain = \brooksroy.com\ , 164) = 164
24597 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
24403 --- SIGCHLD (Child exited) @ 0 (0) ---
24403 write(1, 454 oops, problem with child and I can\'t auth 
(#4.3.0)\r\n, 56) = 56

Also in my /var/log/messages I am seeing:
vchkpw[24597]: segfault at  rip  rsp 
007fb450 error 14

Thanks!


[vchkpw] Re: SMTP Auth HOW? *UPDATE* AMD64

2004-05-25 Thread Peter Palmreuther
Hello Blist,

On Tuesday, May 25, 2004 at 6:22:11 PM you wrote (at least in part):

 After tyring with these values I get:

 24597 --- SIGSEGV (Segmentation fault) @ 0 (0) ---

That's not necessarily easy to debug.

First try this:

 $printf [EMAIL PROTECTED] /tmp/auth.data
 $setuidgid /usr/local/vpopmail/bin/vchkpw \
   /bin/sh -c 'echo Yes' /tmp/auth.data  30

And if this does not output 'Yes' please 'strace' it without '-e'
option.

If this segfaults too, one /might/ be able to guess why from the
strace and the last action done. If this is not possible you'd have to
'dbg' vchkpw, to figure what's wrong. Nevertheless 'til now your
original problem was not reproduced. So it seems something is really
going wrong in your installation.
-- 
Best regards
Peter Palmreuther

Clap on!  clap clap Clap off!  clap clap ~2v2h~#bu4bNO CARRIER



Re: [vchkpw] Re: SMTP Auth HOW? *UPDATE* AMD64

2004-05-25 Thread Linux-Guru
Am Dienstag, 25. Mai 2004 19:18 schrieb Peter Palmreuther:
 Hello Blist,

 On Tuesday, May 25, 2004 at 6:22:11 PM you wrote (at least in part):
  After tyring with these values I get:
 
[...]
 If this segfaults too, one /might/ be able to guess why from the
 strace and the last action done. If this is not possible you'd have to
 'dbg' vchkpw, to figure what's wrong. Nevertheless 'til now your
 original problem was not reproduced. So it seems something is really
 going wrong in your installation.
Hi Peter, hi blist, hi all others.

Peter, you are wrong! Same behaviour here. The only difference is, that I use 
Gentoo and not SuSE.
What Erwin and I found out today, is, that we get the same error when using 
checkpassword.
So Jeremy was partly right on IRC when he said it's not vpopmail. If it is 
qmail, which he thiught it wouldn't bee, too, can't be said right now.
Of course, it is not stock qmail, but IMHO it _could_ be the smtp-auth-patch.

Peter, I'll contact you in replay of your mail which you wrote me off-list.

Greetings

Tobias


[vchkpw] Re: SMTP Auth HOW? *UPDATE* AMD64

2004-05-24 Thread Peter Palmreuther
Hello Blist,

On Sunday, May 23, 2004 at 9:28:35 PM you wrote (at least in part):

 == /var/log/mail ==
 May 23 15:10:53 ps1 vpopmail[14133]: vchkpw-smtp: invalid user/domain
 characters [EMAIL PROTECTED] :192.168.5.50

Where does the space character after '.com' comes from? Seems there's
something wrong with Base64-decoding / handing decoded values over to
vchkpw. I might be wrong, but all logs similar to this found in my
system logs have 'username:IP' instead of 'username :IP'.

I'd say this is a case for strace/truss, to see if qmail already write
the blank into fd #3 or if vchpw insertes it, and in the former case
it's a file for 'dbg' or similar (and a '-g2' compiled qmail), to
figure who inserts it. In the latter case one has to 'dbg' vchpw to
see when this blank appears first.
-- 
Best regards
Peter Palmreuther

I am not part of the problem. I am a Republican. -- Dan Quayle
trivia --



Re: [vchkpw] Re: SMTP Auth HOW? *UPDATE* AMD64

2004-05-24 Thread blist




Peter Palmreuther wrote:
Where
does the space character after '.com' comes from? Seems there's
  something wrong with Base64-decoding / handing decoded values over to
vchkpw. I might be wrong, but all logs similar to this found in my
system logs have 'username:IP' instead of 'username :IP'.

I'd say this is a case for strace/truss, to see if qmail already write
the blank into fd #3 or if vchpw insertes it, and in the former case
it's a file for 'dbg' or similar (and a '-g2' compiled qmail), to
figure who inserts it. In the latter case one has to 'dbg' vchpw to
see when this blank appears first.
  

Peter,

Here is a copy of the strace log:

ps1:/service/qmail-smtpd # strace /usr/local/bin/softlimit -m 2000
/usr/local/bin/tcpserver -v -H -R -l 0 -x
/usr/local/vpopmail/etc/tcp.smtp.cdb -c 20 -u 616 -g 616 0 25
/var/qmail/bin/qmail-smtpd /usr/local/vpopmail/bin/vchkpw /bin/true
21
execve("/usr/local/bin/softlimit", ["/usr/local/bin/softlimit", "-m",
"2000", "/usr/local/bin/tcpserver", "-v", "-H", "-R", "-l", "0",
"-x", "/usr/local/vpopmail/etc/tcp.smtp.cdb", "-c", "20", "-u", "616",
"-g", "616", "0", "25", "/var/qmail/bin/qmail-smtpd",
"/usr/local/vpopmail/bin/vchkpw", "/bin/true"], [/* 44 vars */]) = 0
uname({sys="Linux", node="ps1", ...}) = 0
brk(0) = 0x504000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2a9556b000
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=43645, ...}) = 0
mmap(NULL, 43645, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2a9556c000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\20\335\1"..., 640) =
640
fstat(3, {st_mode=S_IFREG|0755, st_size=1534814, ...}) = 0
mmap(NULL, 2365888, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x2a9566d000
mprotect(0x2a95791000, 1169856, PROT_NONE) = 0
mmap(0x2a9586d000, 253952, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x10) = 0x2a9586d000
mmap(0x2a958ab000, 14784, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2a958ab000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2a958af000
munmap(0x2a9556c000, 43645) = 0
getrlimit(0x2, 0x7fb410) = 0
setrlimit(RLIMIT_DATA, {rlim_cur=2000, rlim_max=RLIM_INFINITY}) = 0
getrlimit(0x3, 0x7fb410) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2000, rlim_max=RLIM_INFINITY}) = 0
getrlimit(0x8, 0x7fb410) = 0
setrlimit(RLIMIT_MEMLOCK, {rlim_cur=2000, rlim_max=RLIM_INFINITY})
= 0
getrlimit(0x9, 0x7fb410) = 0
setrlimit(RLIMIT_AS, {rlim_cur=2000, rlim_max=RLIM_INFINITY}) = 0
execve("/usr/local/bin/tcpserver", ["/usr/local/bin/tcpserver", "-v",
"-H", "-R", "-l", "0", "-x", "/usr/local/vpopmail/etc/tcp.smtp"...,
"-c", "20", "-u", "616", "-g", "616", "0", "25", ...], [/* 44 vars */])
= 0
uname({sys="Linux", node="ps1", ...}) = 0
brk(0) = 0x50d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2a9556b000
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=43645, ...}) = 0
mmap(NULL, 43645, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2a9556c000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\0\1\0\0\0\20\335\1"..., 640) =
640
fstat(3, {st_mode=S_IFREG|0755, st_size=1534814, ...}) = 0
mmap(NULL, 2365888, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
0x2a9566d000
mprotect(0x2a95791000, 1169856, PROT_NONE) = 0
mmap(0x2a9586d000, 253952, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
3, 0x10) = 0x2a9586d000
mmap(0x2a958ab000, 14784, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2a958ab000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x2a958af000
munmap(0x2a9556c000, 43645) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
rt_sigaction(SIGCHLD, {0x401ac0, [], 0x400}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0x401ab0, [], 0x400}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
open("/etc/dnsrewrite", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file
or directory)
open("/etc/resolv.conf", O_RDONLY|O_NONBLOCK) = 3
read(3, "nameserver 127.0.0.1\nnameserver "..., 64) = 64
read(3, "t\n", 64) = 2
read(3, "", 64) = 0
close(3) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR|O_LARGEFILE)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [-4611694294829367295], 4) = 0
bind(3, {sa_family=AF_INET, sin_port=htons(25),
sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(25),
sin_addr=inet_addr("0.0.0.0")}, [1801439859538133008]) = 0
listen(3, 20) = 0
fcntl(3, F_GETFL) = 0x802 (flags
O_RDWR|O_NONBLOCK|O_LARGEFILE)
fcntl(3, F_SETFL, O_RDWR) = 0
setgroups(1, [616]) = 0
setgid(616) = 0
setuid(616) = 0
close(0) = 0

[vchkpw] Re: SMTP Auth HOW? *UPDATE* AMD64

2004-05-24 Thread Peter Palmreuther
Hello Blist,

On Monday, May 24, 2004 at 4:47:43 PM you wrote (at least in part):

I'd say this is a case for strace [...]
 Here is a copy of the strace log:

Please replace your strace call by

strace -fF -s 4096 -o /tmp/qmail.log -e write ...

(replace '...' with 'softlimit -m ...' and so on).

else we'll not see what qmail hands over to vchkpw.
-- 
Best regards
Peter Palmreuther

SLIDING DOWN THE RAZOR BLADES OF LIFE



Re: [vchkpw] Re: SMTP Auth HOW? *UPDATE* AMD64

2004-05-24 Thread blist




Peter Palmreuther wrote:

  
Please replace your strace call by

strace -fF -s 4096 -o /tmp/qmail.log -e write ...

(replace '...' with 'softlimit -m ...' and so on).

else we'll not see what qmail hands over to vchkpw.
  


3906 write(2, "tcpserver: status: 0/20\n", 24) = 24
3906 write(2, "tcpserver: status: 1/20\n", 24) = 24
10092 write(2, "tcpserver: pid 10092 from 192.168.5.50\n", 39) = 39
10092 write(2, "tcpserver: ok 10092 0:192.168.5.50:25
:192.168.5.50::32817\n", 59) = 59
10092 write(1, "220 box.prostream.net ESMTP\r\n", 29) = 29
10092 write(1, "504 auth type unimplemented (#5.5.1)\r\n", 38) = 38
10092 write(1,
"250-box.prostream.net\r\n250-PIPELINING\r\n250-8BITMIME\r\n250 AUTH
LOGIN PLAIN CRAM-MD5\r\n", 84) = 84
10092 write(1, "334 VXNlcm5hbWU6\r\n", 18) = 18
10092 write(1, "334 UGFzc3dvcmQ6\r\n", 18) = 18
10092 write(4, "[EMAIL PROTECTED]", 27) = 27
10412 write(2, "domain invalid brooksroy.com\n\n", 30) = 30
10412 write(5, "\33\0\0\1\215 \0\0\0root\0W_OYDVUA\0vpopmail", 31) = 31
10412 write(5, "\v\1\0\0\3INSERT INTO vlog set user=\"brooks\",
passwd=\"jj\n\", domain=\"brooksroy.com\n\",
logon=\"[EMAIL PROTECTED]", remoteip=\"192.168.5.50\",
message=\"vchkpw-smtp: invalid user/domain characters
[EMAIL PROTECTED]:192.168.5.50\", error=3,
timestamp=1085433138", 271) = 271
10412 write(5, "\1\0\0\0\1", 5) = 5
10092 --- SIGCHLD (Child exited) @ 0 (0) ---
10092 write(1, "535 authentication failed (#5.7.1)\r\n", 36) = 36