Package: bsd-mailx / 8.1.2-0.20141216cvs-2

Metadata

Package Version Patches format
bsd-mailx 8.1.2-0.20141216cvs-2 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
00 Makefiles.patch | (download)

Makefile | 33 30 + 3 - 0 !
USD.doc/Makefile | 14 9 + 5 - 0 !
2 files changed, 39 insertions(+), 8 deletions(-)

 00 makefiles.

Fix makefiles to make it possible to compile mailx on non-BSD systems.

01 Fix includes.patch | (download)

def.h | 4 3 + 1 - 0 !
edit.c | 6 6 + 0 - 0 !
list.c | 3 3 + 0 - 0 !
names.c | 1 1 + 0 - 0 !
send.c | 1 1 + 0 - 0 !
5 files changed, 14 insertions(+), 1 deletion(-)

 01 fix includes.


02 Base fixes 1.patch | (download)

USD.doc/mail1.nr | 2 1 + 1 - 0 !
USD.doc/mail5.nr | 2 1 + 1 - 0 !
collect.c | 2 2 + 0 - 0 !
head.c | 3 3 + 0 - 0 !
mail.1 | 6 3 + 3 - 0 !
main.c | 2 1 + 1 - 0 !
misc/mail.rc | 4 2 + 2 - 0 !
names.c | 3 2 + 1 - 0 !
pathnames.h | 39 35 + 4 - 0 !
9 files changed, 50 insertions(+), 13 deletions(-)

 02 base fixes 1.

Fixes from  Debian patch 1:8.1.1-10

03 Base fixes 2.patch | (download)

cmd1.c | 2 2 + 0 - 0 !
def.h | 9 9 + 0 - 0 !
extern.h | 2 1 + 1 - 0 !
mail.1 | 20 10 + 10 - 0 !
main.c | 21 17 + 4 - 0 !
send.c | 2 2 + 0 - 0 !
vars.c | 9 7 + 2 - 0 !
7 files changed, 48 insertions(+), 17 deletions(-)

 03 base fixes 2.

Fixes from  Debian patch 1:8.1.1-10.3

04 Add custom header.patch | (download)

def.h | 1 1 + 0 - 0 !
extern.h | 2 1 + 1 - 0 !
mail.1 | 8 7 + 1 - 0 !
main.c | 24 21 + 3 - 0 !
send.c | 6 5 + 1 - 0 !
5 files changed, 35 insertions(+), 6 deletions(-)

 04 add custom header.

Provide a possibility to add custom header fields such as
"X-Loop: This service" or "X-Generated: via cron"
(Closes: Bug#23356, Bug#13756).

05 Mailx fixes.patch | (download)

extern.h | 2 1 + 1 - 0 !
mail.1 | 9 8 + 1 - 0 !
main.c | 20 20 + 0 - 0 !
names.c | 10 6 + 4 - 0 !
vars.c | 5 3 + 2 - 0 !
5 files changed, 38 insertions(+), 8 deletions(-)

 05 mailx fixes.

mailx (1:8.1.1-10.1.3) frozen unstable; urgency=high

  * More security fixes
  * Don't allow to set interactive in mailrc (or interactively)
  * Modify the variable-handling code to grok NULL values

 -- Wichert Akkerman <wakkerma@debian.org>  Mon,  7 Aug 2000 17:22:57 -0700

mailx (1:8.1.1-10.1.2) frozen unstable; urgency=high

 * Another security problem: refuse to get the interactive variable
   from the environment by explicitly setting it in the hashtable.

 -- Wichert Akkerman <wakkerma@debian.org>  Mon,  7 Aug 2000 12:36:10 -0700

06 Use lockf instead of flock.patch | (download)

quit.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 06 use lockf instead of flock.

quit.c: Use lockf instead if flock.

07 Initialize head struct.patch | (download)

cmd2.c | 2 1 + 1 - 0 !
cmd3.c | 2 2 + 0 - 0 !
collect.c | 2 1 + 1 - 0 !
3 files changed, 4 insertions(+), 2 deletions(-)

 07 initialize head struct.

Initialize head struct and other fixes.

08 Use liblockfile library.patch | (download)

popen.c | 64 64 + 0 - 0 !
1 file changed, 64 insertions(+)

 08 use liblockfile library.

Security fix: don't install mailx binary setgid mail.
Now the liblockfile library is used for mailbox locking.

09 Saved mbox message.patch | (download)

quit.c | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 09 saved mbox message.

Debian Bug#68920:
Save message says mbox even when $MBOX is set

10 Reply To header.patch | (download)

cmd3.c | 9 9 + 0 - 0 !
collect.c | 11 10 + 1 - 0 !
def.h | 12 8 + 4 - 0 !
extern.h | 2 1 + 1 - 0 !
mail.1 | 10 9 + 1 - 0 !
main.c | 8 6 + 2 - 0 !
names.c | 3 2 + 1 - 0 !
send.c | 13 11 + 2 - 0 !
8 files changed, 56 insertions(+), 12 deletions(-)

 10 reply-to header.

Applied some patches from FreeBSD:
 + Add Relpy-To header if REPLYTO environment variable is set.
 + Add In-Reply-To header for replies (closes: #23115).

11 Showname option.patch | (download)

aux.c | 9 7 + 2 - 0 !
cmd1.c | 2 1 + 1 - 0 !
cmd3.c | 18 9 + 9 - 0 !
extern.h | 2 1 + 1 - 0 !
4 files changed, 18 insertions(+), 13 deletions(-)

 11 showname option

Debian Bug#96867:

Dear mailx maintainer,

I have written a patch that mimics the SunOS mailx
"showname" option, that is, in the mail header listing the
senders full name is shown instead of the e-mail address.

I had to make the "skin" function aware of the reptype variable,
and thus give a reptype value for each call of skin. Ugly but
it seems to work.

12 REPLYTO can be set in .mailrc too.patch | (download)

cmd3.c | 4 2 + 2 - 0 !
main.c | 4 3 + 1 - 0 !
send.c | 2 1 + 1 - 0 !
3 files changed, 6 insertions(+), 4 deletions(-)

 12 replyto can be set in .mailrc too.

REPLYTO can be set in ~/.mailrc too.

13 Mailx concatenates messages.patch | (download)

edit.c | 18 18 + 0 - 0 !
1 file changed, 18 insertions(+)

 13 mailx concatenates messages.

Debian Bug#71759

Check if there is still an empty line at
the end of the edited message. If not, it adds one.

14 Truncate mailbox instead of deleting it.patch | (download)

fio.c | 8 8 + 0 - 0 !
quit.c | 4 4 + 0 - 0 !
2 files changed, 12 insertions(+)

 14 truncate mailbox instead of deleting it.

fio.c: Don't delete mailbox file, always truncate it,
because liblockfile fails to remove the lock file if mailbox doesn't exist (closes: #111537).

quit.c: change message saing that mailbox was "removed" to "truncated" (closes: #196682);

15 No space left in tmp.patch | (download)

collect.c | 38 29 + 9 - 0 !
1 file changed, 29 insertions(+), 9 deletions(-)

 15 no space left in /tmp

Debian Bug#37104

The problem reported here, i.e. a segmentation fault when reading mail
is already corrected. The message "Message temporary file corrupted"
is printed by a call to "errx" instead of "panic" as it was in
mailx-8.1.1-10.

*But* there is another problem[1]: mailx sends an empty mail when
there is no space left in "/tmp". Here is a patch making mailx check
if all is ok when writing new mail in temporary file. If not, it
outputs an error message and no longer sends an empty mail.

16 Stdin not a tty.patch | (download)

tty.c | 4 4 + 0 - 0 !
1 file changed, 4 insertions(+)

 16 stdin not a tty.

Return from grabh() if stdin is not a terminal.
This fixes the `-I' option (closes: #149005).

17 Intialize tv_used.patch | (download)

aux.c | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 17 intialize tv_used

aux.c: in function alter() do initialize tv_usec part of the timeval structure
 used to set modification time on the mailbox file (closes: #152038).
Thanks to John Girash for help.

18 Wait for sendmail.patch | (download)

popen.c | 12 9 + 3 - 0 !
send.c | 15 15 + 0 - 0 !
2 files changed, 24 insertions(+), 3 deletions(-)

 18 wait for sendmail.

* send.c: Always wait for a sendmail process, check its exit code
  and if non-zero, print a warning message to user and save original
  message to ~/dead.letter (closes: #145379).

* popen.c: Make wait_child() return an exit code of the child.

19 Fix compilation on Hurd.patch | (download)

def.h | 4 4 + 0 - 0 !
1 file changed, 4 insertions(+)

 19 fix compilation on hurd.

Fix problem with building on Hurd (closes: #213929).

20 Don t delete temporary file.patch | (download)

edit.c | 17 16 + 1 - 0 !
1 file changed, 16 insertions(+), 1 deletion(-)

 20 don't delete temporary file

If the external editor (called by ~e or ~v commands) fails for
some reason, don't delete the temporary file if it has been modified.
This partly fixes bug#148071.

21 Use wordexpr instead of echo.patch | (download)

fio.c | 60 54 + 6 - 0 !
names.c | 5 3 + 2 - 0 !
2 files changed, 57 insertions(+), 8 deletions(-)

 21 use wordexpr instead of echo.

fio.c: Use wordexpr() instead of calling /bin/echo not to allow
    executing external commands while expanding shell variables
    and wildcards.

22 Replace newlines with spaces.patch | (download)

main.c | 6 6 + 0 - 0 !
1 file changed, 6 insertions(+)

 22 replace newlines with spaces.

main.c: Replace with spaces any embeded newline passed in arguments
for '-s' and '-a' options (closes: #419840).

24 False cant send email errors.patch | (download)

extern.h | 1 1 + 0 - 0 !
popen.c | 9 9 + 0 - 0 !
send.c | 30 30 + 0 - 0 !
3 files changed, 40 insertions(+)

 24 false cant send email errors.

Debian Bug  #550116:

This bug is caused by the patch in "send.c" for the bug report #145379.
Under certain circumstances, a race condition can occur if:
1. The parent fork()'s a process and exec()'s "sendmail" in "send.c".
The child process is born.
2. The child starts, finishes quickly and exits. The parent has not
called wait_child(pid) in "send.c" yet.
3. The parent immediately gets SIGCHLD because the child exited already.
The sigchild() handler in "popen.c" reaps the child via waitpid() and
exits directly because findchild(pid, 1) returned NULL. It returned NULL
because the PID of the child process has not been added to the "child"
structure list at all.
4. The execution of the parent process is resumed in "send.c", and it
now calls wait_child(pid). The function wait_child(pid) returns "-1"
because wait_child(pid) in "popen.c" calls waitpid(pid, ...) again for
the same child PID, which the sigchild() handler already reaped. The
second call to findchild(pid, 1) by wait_child(pid) in "popen.c" returns
NULL too, because as already stated the PID of the child process has not
been added to the "child" structure list. As a result, the false error
message "Can't send mail: sendmail process failed" is given.

This bug happens only rarely, usually when the system is under load and
the parent process lags a bit after the child one. But it does happen.
We send about 15 messages every hour on 36 servers each, and we get 10
false error messages on average for 24 hours (0.08% false error rate).

25 Fix confusing error.patch | (download)

main.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 25 fix confusing error

Fix an error message shown when -s, -c, or -b is used without -t
to be less confusing for users (closes: #327809).

26 Add missing include.patch | (download)

lex.c | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 26 add missing include

Add #include <bsd/err.h> to fix implicit declaration of
function 'warnc' warning.

27 Fix getopt string.patch | (download)

main.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 27 fix getopt string

Apply patch from upstream [1] to fix -N flag
that does not take an argument (LP: #1411623).