FS#35684 - /bin symlink breaks fetchmail

Attached to Project: Arch Linux
Opened by Scott Lawrence (srl) - Friday, 07 June 2013, 02:49 GMT
Last edited by Allan McRae (Allan) - Friday, 07 June 2013, 03:34 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

fetchmail uses execve("/bin/sh", ...) (well, popen actually, but that's what popen does) to invoke the MDA. With /bin a symlink, fetchmail errors out at this point with

fetchmail: Error writing to MDA: Broken pipe

Using `strace -vf fetchmail` reveals that execve is returning EPERM. Removing the /bin symlink and replacing it with a normal directory containing only /bin/sh (either as an actual copy of bash, or a symlink to /usr/bin/bash) "solves" the problem.

Interestingly, a quick test program consisting only of popen("maildrop", "w") functions correctly, with strace saying that the same execve() call was successful. As far as I've noticed, only fetchmail can encounter this problem.

Keeping /bin a symlink, but changing /bin/sh to be just a copy of /bin/bash, does not fix it.

fetchmail 6.3.26-1
Linux baidar 3.9.4-1-ARCH #1 SMP PREEMPT Sat May 25 16:14:55 CEST 2013 x86_64 GNU/Linux
This task depends upon

Closed by  Allan McRae (Allan)
Friday, 07 June 2013, 03:34 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comment
Comment by Scott Lawrence (srl) - Friday, 07 June 2013, 03:27 GMT
Mark this invalid, I suppose - I figured it out. TOMOYO was blocking fetchmail from executing /usr/bin/bash.

Sorry for the noise.

Loading...