Package: nvi Version: 1.81.6-11+b1 Severity: important Tags: patch Dear Maintainer,
/etc/init.d/nviboot attempts to send mail about recovery from crashed editor sessions, but the attempt fails due to a misplaced quote. This line: (su - nobody -s /bin/sh -c "$SENDMAIL $owner < $i" &) </dev/null >/dev/null 2>&0 should be: (su - nobody -s /bin/sh -c "$SENDMAIL $owner" < $i &) </dev/null >/dev/null 2>&0 That is, the input redirection needs to be outside the quotes, so that root opens the file, rather than inside the quotes, where it causes nobody to open the file, which fails because the file is not world-readable. By the way, this kind of problem might be easier to detect if stderr were not hidden. I suspect that is done to hide the complaint from su about the lack of home directory for user nobody. Another way to avoid that error is to omit the '-' from the su command. So you might consider changing that line to: su nobody -s /bin/sh -c "$SENDMAIL $owner" < $i & Also, do stdout and stderr from init scripts get logged anywhere? History: The need for quotes was reported against nvi_1.79-22 in bug 355639 on 2006-Mar-06. The changelog claims that quotes were added in version 1.79-23 (2006-May-26): * Fix invocation of su in init.d/nvi to use quotes (closes: #355639) But I looked at the 1.79-23 source, and there were still no quotes. The need for quotes was then reported against nvi_1.79-25 in bug 465727 on 2008-Feb-14, which included a correct patch with the redirection outside the quotes. The changelog claims that the bug was fixed in version 1.81.6-1 (2008-Jun-13): * Fix sendmail invocation in the initscript. Closes: #465727. I looked at the source for the next version I could find, 1.81.6-3, and found the erroneous syntax that survives to this day, with the redirection inside the quotes. I checked my mail archive, and I have received no mail from nvi since 2008. Of course it's still possible to poll manually using 'vi -r'. Maybe I should write a cron job to do that... -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (900, 'testing'), (800, 'stable'), (600, 'unstable') Architecture: i386 (i686) Kernel: Linux 3.14-1-686-pae (SMP w/1 CPU core) Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/dash Versions of packages nvi depends on: ii libc6 2.18-7 ii libdb5.3 5.3.28-3 ii libncursesw5 5.9+20140118-1 ii libtinfo5 5.9+20140118-1 Versions of packages nvi recommends: pn nvi-doc <none> nvi suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-qa-packages-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141115204710.pdn~@nicemice.net