Control: reassign -1 liblockfile1 1.09-5 Control: affects -1 + sendmail-bin
On 2014-01-25 22:28, Paul Szabo wrote: > The wheezy mail.local is unable to deliver mail. I was getting syslog > lines like: > > Jan 26 07:41:37 bari mail.local[11136]: lockmailbox psz failed; error code 75 > Jan 26 07:41:37 bari sm-mta[11135]: s0PKfb67011134: > to=<p...@bari.maths.usyd.edu.au>, delay=00:00:00, xdelay=00:00:00, > mailer=local, pri=30977, dsn=4.0.0, stat=Deferred: local mailer > (/usr/lib/sm.bin/mail.local) exited with EX_TEMPFAIL > > Looking into the problem with strace, I noticed that running mail.local > with "strace -f" allowed it to succeed. A possible workaround is to move sounds like a race condition, strace will change the timing ... > The following short C code demonstrates the issue. > > > /* > Testing with code mimicking sendmail mail.local . > Compile with > cc mytest.c -llockfile > Fails when running "plain" or with strace, but succeeds > when running with strace -f as shown below: > root# ./a.out > lockmailbox psz code 2 errno=1 > root# strace -o outx ./a.out > lockmailbox psz code 2 errno=1 > root# strace -o outy -f ./a.out > root# > Another oddity: in the output of "strace -f" I see > geteuid32() return 0 within the children (in the execed > /usr/bin/dotlockfile): should not that return 1001? > */ > > #include <stdlib.h> > #include <unistd.h> > #include <stdio.h> > #include <errno.h> > #include <maillock.h> > > int > main(argc, argv) > int argc; > char *argv[]; > { > /* name and UID of some plain user */ > char *p = "psz"; > uid_t uid = 1001; > > int off; > > /* use a reasonable umask */ > (void) umask(0077); > > /* change UID for quota checks */ > if (setreuid(0, uid) < 0) > { > printf("450 setreuid(0, %d) errno=%d (r=%d, e=%d)\n", > (int) uid, errno, (int) getuid(), (int) geteuid()); > exit(1); > } > > if ((off = maillock(p, 15)) != 0) > { > printf("lockmailbox %s code %d errno=%d\n", p, off, errno); > } > > mailunlock(); > } Thanks for the testcase. Reassigning to liblockfile. Andreas -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org