Description of Problem: If a user account is defined in an LDAP directory, and you have cronjob which calls /bin/mail to send mail to that user. mail will segfault (see strace) user local to the machine are not affected. Version-Release number of selected component (if applicable): mailx-8.1.1-22 How Reproducible: always, but only in a cronjob Steps to Reproduce: 1. send mail to an ldap user from cron. such as: 2. */1 **** username /bin/mail -s "testing" ldapuser 3. Actual Results: Segfault and no mail is sent. Expected Results: Mail should be sent. Additional Information: see attachment, calling sendmail directory does not exhibit this problem.
Created attachment 76551 [details] strace of /bin/mail from cron.
Slight mistake on my part above: The segv occurs when sending mail as an ldap user, It makes no difference who the mail goes to. The example cron should be: */1 **** ldapuser /bin/mail -s "testing" user
If possible an ltrace output would help identifying where this bug could be in the source code. Thanks, Florian La Roche
This is an old bug report, but I'm trying to resurrect it because the bug still exists in Fedora Core 1 (and may be related to the failure of 'at' to send e-mail to an LDAP user at all). The LDAP user's crontab read: crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.8320 installed on Tue Jan 6 10:04:55 2004) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) */1 * * * * ltrace /bin/mail -s "testing" user and the e-mail contained the following ltrace output: __libc_start_main(0x08051860, 4, 0xbfeaafd4, 0x080560c8, 0x08056110 <unfinished ...> getegid() = 500 getgid() = 500 setgid(500) = 0 signal(17, 0x08053370) = NULL isatty(0) = 0 getopt(4, 0xbfeaafd4, "INT:b:c:dfins:u:v") = 115 getopt(4, 0xbfeaafd4, "INT:b:c:dfins:u:v") = -1 malloc(128) = 0x081d7008 strlen("stephen.walton") = 23 bcopy(0xbff9ef6a, 0x081d7018, 24) = <void> getenv("TMPDIR") = NULL tempnam("/tmp/", "Rs") = "/tmp/Rs7WNhOV" tempnam("/tmp/", "Rq") = "/tmp/Rq05sBfz" tempnam("/tmp/", "Rm") = "/tmp/Rm1OxWGc" tempnam("/tmp/", "Re") = "/tmp/ReEzTi8P" tempnam("/tmp/", "Rx") = "/tmp/RxNWEGzt" getenv("USER") = NULL getuid() = 505 getpwuid(505, 0x002a4e0f, 0xbfeaae68, 0x0804f89f, 505 <unfinished ...> fflush(0) = 0 --- SIGSEGV (Segmentation fault) --- +++ killed by SIGSEGV +++
Created attachment 98109 [details] dump of two straces; one from cron with user in ldap, one from cron with user in local passwd file
Created attachment 98110 [details] nsswitch.conf for which I see this bug
Created attachment 98111 [details] system-auth when I see this bug
I also see this on RHL 8. A workaround that WFM is to make sure the LOGNAME environment variable is set.
*** This bug has been marked as a duplicate of 134837 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.