[Bug 193516] Re: Cryptic error from sudo when /usr/sbin/sendmail doesn't exist
*** This bug is a duplicate of bug 32906 *** https://bugs.launchpad.net/bugs/32906 ** This bug has been marked a duplicate of bug 32906 sudo fails if it cannot resolve the local hostname and no MTA is installed -- Cryptic error from sudo when /usr/sbin/sendmail doesn't exist https://bugs.launchpad.net/bugs/193516 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 193516] Re: Cryptic error from sudo when /usr/sbin/sendmail doesn't exist
See also https://bugs.edge.launchpad.net/ubuntu/+source/sudo/+bug/32906 Is this now fixed in hardy-proposed for you? -- Cryptic error from sudo when /usr/sbin/sendmail doesn't exist https://bugs.launchpad.net/bugs/193516 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 193516] Re: Cryptic error from sudo when /usr/sbin/sendmail doesn't exist
** Changed in: sudo Status: Unknown => Fix Released -- Cryptic error from sudo when /usr/sbin/sendmail doesn't exist https://bugs.launchpad.net/bugs/193516 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 193516] Re: Cryptic error from sudo when /usr/sbin/sendmail doesn't exist
** Bug watch added: Gratisoft Bugzilla #283 http://www.gratisoft.us/bugzilla/show_bug.cgi?id=283 ** Also affects: sudo via http://www.gratisoft.us/bugzilla/show_bug.cgi?id=283 Importance: Unknown Status: Unknown -- Cryptic error from sudo when /usr/sbin/sendmail doesn't exist https://bugs.launchpad.net/bugs/193516 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 193516] Re: Cryptic error from sudo when /usr/sbin/sendmail doesn't exist
I tried it under similar conditions: dapper chroot, my user not in sudoers, but I have a password in /etc/shadow, so that PAM can actually authenticate me. I just get $ sudo ls Password: martin is not in the sudoers file. This incident will be reported. without a "Broken pipe" error message, but I understand that this is subject to a race condition. My strace -f output also contains similar output, and a quick inspection of logging.c, send_mail() shows that this hasn't been fixed in Hardy yet. ** Changed in: sudo (Ubuntu) Importance: Undecided => Low Status: New => Confirmed -- Cryptic error from sudo when /usr/sbin/sendmail doesn't exist https://bugs.launchpad.net/bugs/193516 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 193516] Re: Cryptic error from sudo when /usr/sbin/sendmail doesn't exist
strace'ing the problem revealed the reason for the cryptic error: # strace -u mast sudo ls /.../ pipe([4, 5])= 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2b34bf991b80) = 15504 close(4)= 0 fcntl(5, F_GETFL) = 0x1 (flags O_WRONLY) fstat(5, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b34bf029000 lseek(5, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek) stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1892, ...}) = 0 write(5, "To: root\nFrom: mast\nSubject: ***"..., 176) = -1 EPIPE (Broken pipe) --- SIGPIPE (Broken pipe) @ 0 (0) --- +++ killed by SIGPIPE +++ One can see here that the broken pipe comes from trying to pipe a mail to a subprocess. Tracing that one too reveals: dup2(4, 0) = 0 close(4)= 0 close(5)= 0 close(3)= 0 setgid(1021)= 0 setreuid(1021, 1021)= 0 execve("/usr/sbin/sendmail", ["/usr/sbin/sendmail", "-t"], [/* 4 vars */]) = -1 ENOENT (No such file or directory) exit_group(127) = ? I.e. /usr/sbin/sendmail doesn't exist. (The error that sudo tried to mail was that my user didn't exist in /etc/sudoers.) Note that this has nothing to do with the chroot environment as I suspected, but rather that sudo doesn't gracefully handle the case when /usr/sbin/sendmail doesn't exist. I was able to reproduce the same problem outside the chroot. ** Summary changed: - Cryptic error from sudo in chroot environment + Cryptic error from sudo when /usr/sbin/sendmail doesn't exist -- Cryptic error from sudo when /usr/sbin/sendmail doesn't exist https://bugs.launchpad.net/bugs/193516 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs