2002-04-08 20:27 millert * collect.c: Don't do tilde escapes unless we are in interactive mode. Now the behavior matches the man page... 2002-03-14 06:51 mpech * fio.c: Remove \n from err/errx/warn/warnx(). millert@ ok 2002-02-16 21:27 millert * def.h: Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically. 2002-01-24 23:01 millert * temp.c: Fix `necesary' typos; Alexander Yurchenko Alas many of these were introduced by yours truly as necessary just doesn't look right to me for some reason ;-) 2002-01-24 20:33 mickey * mail.1: fix the history refs 2001-12-18 16:55 millert * fio.c: We need to adjust where "dot" points when we realloc(message). Problem found by Mike Heffner of the FreeBSD project. 2001-11-28 01:26 millert * extern.h, send.c: Catch SIGINT in sendmessage() so user can interupt a long message that is being output. Make statusput() return an int and return -1 if ferror() 2001-11-28 01:04 millert * tty.c: Fix typo; SIGTTIN where SIGINT meant and rename a variable for clarity. 2001-11-23 00:03 millert * popen.c: Revert change to Popen() to only wrap command in a shell if it contains meta characters since people may expect their aliases to work. Instead, just remove the "kill(lock_pid, SIGTERM);" since lockspool now does the right thing when the pipe is closed. 2001-11-21 20:41 millert * cmd1.c, cmd2.c, cmd3.c, lex.c, list.c, names.c, popen.c, tty.c, vars.c: o kill strcpy() o check return values of malloc and friends o use strdup() when sensible 2001-11-21 18:43 millert * names.c: fix arg reversal that was introduced during ANSIfication 2001-11-21 15:28 millert * main.c: Fix extern decl of version missed in previous commit. 2001-11-21 15:26 millert * aux.c, cmd1.c, cmd2.c, cmd3.c, cmdtab.c, collect.c, def.h, edit.c, extern.h, fio.c, getname.c, glob.h, head.c, lex.c, list.c, main.c, names.c, popen.c, quit.c, send.c, strings.c, temp.c, tty.c, v7.local.c, vars.c, version.c: o ANSIfy o Style nits o Use const to silent stupid -Wall warnings o strnc{py,at} -> strlc{py,at} o Use strpbrk() instead of homegrown anyof() o Use NULL instead of #defines with 0 cast to a pointer This still could use a proper audit 2001-11-20 23:19 millert * popen.c: In private version of popen(), only wrap a command to be run in a shell if it contains meta chars. Sneaky hack to work around a ksh bug. 2001-11-20 20:50 millert * aux.c, cmd1.c, cmd3.c, collect.c, def.h, edit.c, extern.h, fio.c, glob.h, lex.c, main.c, quit.c, tty.c: Major signal overhaul. We no longer longjmp all over the place. Instead, routines responsible to gathering user input (or in some cases outputting data) catch the signals and set flags as needed. Because of this some handlers are install without the SA_RESTART flag so syscalls are not restarted and we can check the flag. All signal handlers are now safe. This should make the flow of control a bit more grokable but the code is still ugly. 2001-11-17 19:10 deraadt * lex.c: properly bail out of incfile(); millert ok 2001-11-16 17:10 millert * cmd1.c, extern.h: Instead of using a longjmp to catch SIGPIPE, just set to SIG_IGN and check the return value on writes for error. Save and restore terminal modes when piping to a command so we end up with a known good state if the command terminates uncleanly. 2001-10-11 20:59 millert * main.c: missing arg to errx 2001-10-04 04:23 pvalchev * pathnames.h: Fix path to /bin/ls; ok millert 2001-09-16 16:12 millert * aux.c: Optimize space-eating loop since we've already checked that the first char is a space. Patch from sacrificial-spam-address@horizon.com 2001-09-16 15:27 millert * aux.c: 1) In skin(), only add a space after a comma if there is actually a space in the input buffer. This prevents a rare buffer overflow on very long header lines where one or more entries has a comment in it but the entries have no space after the comma *and* the amount of extra space needed to add a space after each comma is greater than the length of the comments that will be removed. This is debian bug #108677 2) In skin(), use a temporary variable in the realloc() and don't die if realloc() fails since its only purpose is to shrink the buffer, not expand it (and thus is not fatal). 2001-09-07 01:19 millert * main.c: Sanity check length of -u argument to avoid truncation later on. 2001-09-04 23:16 millert * popen.c: Fix bogus use of snprintf return value. Since we know the max length of a username we can use that as part of the buffer size. 2001-06-23 23:04 millert * cmd1.c, collect.c, lex.c, tty.c: Remove evil #ifdef __GNUC__ garbage to avoid longjmp clobbering and use volatile instead. 2001-01-19 04:11 millert * cmd3.c, edit.c, head.c, popen.c: More fixes from Don Beusee: - edit and other interactive commands have no stdin (making the command completely broken). - messages with "From " line having date format with -0800 type of timezone are not recognized correctly. 2001-01-16 05:36 millert * aux.c, cmd1.c, cmd3.c, cmdtab.c, collect.c, def.h, extern.h, fio.c, lex.c, list.c, names.c, pathnames.h, popen.c, quit.c, send.c, vars.c, version.c: Changes from Don Beusee: o escape From line with a leading '>' when needed o only print To: address and Subject lines if actually present o new variable 'allnet' to treat user@foo and user@bar as the same "user" o folders command now takes an optional argument like ls. o new "pipe" (|) command to pipe the message through an arbitrary command o make header display format the same as SunOS 4.1.3 /usr/ucb/mail o tilde commands work regardless of interactive mode. o fix "read: Interrupted system call" error by retrying if EINTR o expanded help file Changes by me: o read the help file via the PAGER as it is now more than 24 lines long 2001-01-16 04:04 millert * misc/: mail.help, mail.tildehelp: Changes from Don Beusee: o escape From line with a leading '>' when needed o only print To: address and Subject lines if actually present o new variable 'allnet' to treat user@foo and user@bar as the same "user" o folders command now takes an optional argument like ls. o new "pipe" (|) command to pipe the message through an arbitrary command o make header display format the same as SunOS 4.1.3 /usr/ucb/mail o tilde commands work regardless of interactive mode. o fix "read: Interrupted system call" error by retrying if EINTR o expanded help file Changes by me: o read the help file via the PAGER as it is now more than 24 lines long 2000-11-09 17:52 aaron * mail.1: Change all option list specifications to ".Bl -tag -width Ds". Most man pages just needed their -width parameter tweaked to "Ds", which provides a nice width of 6 constant characters. For consistency more than anything. 2000-10-06 21:16 jason * cmd1.c, cmd3.c, collect.c, names.c, popen.c, aux.c, edit.c, lex.c, main.c, quit.c, send.c: Pull in patch from current (even more to come): Fix (millert): warnx?/errx? paranoia (use "%s" not a bare string unless it is a constant). These are not security holes but it is worth fixing them anyway both for robustness and so folks looking for examples in the tree are not misled into doing something potentially dangerous. Furthermore, it is a bad idea to assume that pathnames will not include '%' in them and that error routines don't return strings with '%' in them (especially in light of the possibility of locales). 2000-08-23 21:24 mickey * extern.h, names.c, send.c: repair sendmail options handling 2000-08-02 04:10 millert * cmd3.c, fio.c, temp.c: $HOME paranoia: never use getenv("HOME") w/o checking for NULL and non-zero 2000-07-06 06:24 deraadt * lex.c: printf with % for the prompt 2000-06-30 16:00 millert * cmd3.c, names.c, collect.c, aux.c, cmd1.c, edit.c, popen.c, quit.c, send.c, lex.c, main.c: warnx?/errx? paranoia (use "%s" not a bare string unless it is a constant). These are not security holes but it is worth fixing them anyway both for robustness and so folks looking for examples in the tree are not misled into doing something potentially dangerous. Furthermore, it is a bad idea to assume that pathnames will not include '%' in them and that error routines don't return strings with '%' in them (especially in light of the possibility of locales). 2000-06-26 23:18 hugh * mail.1: fix pasto; noted by art 2000-06-11 21:03 millert * mail.1: newaliases(1) -> newaliases(8) 2000-05-15 06:55 deraadt * mail.1: /etc/mail/aliases 2000-04-26 15:47 millert * cmd1.c, cmd2.c, collect.c, extern.h, quit.c, send.c: Change the name of mail's send() function to sendmessages() to avoid shadowing the libc send(2); gadams@avernus.com 2000-04-25 16:42 millert * aux.c, cmd1.c, cmd3.c, extern.h, lex.c: When incorporating new messages, clear the "new" count before the inc so the count of new messages is useful afterwards. This makes mail behave more like the SunOS version in this respect. 2000-04-12 21:47 aaron * mail.1: Trailing whitespace begone! 2000-03-24 21:41 aaron * mail.1: Correct the HISTORY section to note that this command appeared in Version 5 of AT&T UNIX, not Version 6. Verified by strings(1)'ing a .dsk file (PDP-11 executable) containing the v5 sources, obtainable at gatekeeper.dec.com in the directory /pub/DEC/sim/software. Idea from NetBSD PR/4790. 2000-03-23 19:32 millert * names.c: When calling sendmail, use "--" to indicate end of command line arguments. This prevents someone from sneaking arbitrary args to sendmail via the Reply-To: or From: lines. 2000-03-10 19:07 aaron * mail.1: Various cleanups and standardization. 2000-03-04 20:02 aaron * mail.1: Try to standardize the options list introduction; it should read "The options are as follows:", except in special cases. 1999-10-16 20:47 aaron * mail.1: Formatting fixes. 1999-06-05 01:21 aaron * mail.1: - remove trailing white space - remove arguments from .Os macros - remove arguments from .Nm macros, where appropriate - some more Dq/Sq/Ql insanity - still lots to do in the usr.bin tree... :/ 1999-05-12 13:26 aaron * mail.1: grammar police: do not hyphenate compound words that act as adjectives if the first word ends in -ly i.e., fully-qualified, newly-created, globally-visible, etc. are wrong 1998-11-19 23:23 aaron * mail.1: significant cleanup; also s/INTRODUCTION/DESCRIPTION/, in particular for man -h 1998-11-11 23:01 aaron * mail.1: remove redundant .Pp macros 1998-09-27 21:20 millert * mail.1: mail -u foo is not really the same as mail -f /var/mail/foo 1998-09-27 21:16 millert * glob.h, main.c, popen.c: Use new username option to lockspool for 'mail -u'. 1998-09-26 19:55 aaron * mail.1: usr.bin/ man page fixes, f-m. 1998-09-13 03:50 aaron * mail.1: typos 1998-09-12 22:55 todd * misc/mail.help: document reality. 1998-09-10 16:47 millert * mail.1: .Xr lockspool 1 1998-09-10 16:18 millert * popen.c, quit.c: Fix comments 1998-09-10 16:06 millert * popen.c: If a child has not been waited on via the SIGCHLD handler, wait for it ourselves instead of playing games with sigsuspend. This may fix PR 588. 1998-09-10 16:04 millert * mail.1: make mail.1 nroff'able again 1998-09-08 15:24 millert * popen.c: repair order of signal blocking that got changed in conversion to POSIX signals 1998-09-08 14:59 millert * lex.c: Fix comments in .mailrc where there is no space after the hash (#). Noted by pjanzen@foatdi.harvard.edu 1998-09-07 16:44 aaron * mail.1: More man page fixes. Particularly fix uses of it's/its, affect/effect, then/than and such. Other miscellaneous problems fixed across these source files. 1998-09-06 22:23 aaron * mail.1: More man page fixes. Spelling, grammar, some typos. Lots of double-word occurrences squashed as well. 1998-09-01 16:38 deraadt * mail.1: more man page fixes; aaron@ug.cs.dal.ca 1998-08-15 23:17 millert * pathnames.h, popen.c: use lockspool for locking, not 'mail.local -H' 1998-07-16 06:05 millert * mail.1: mention MAIL environment variable 1998-06-25 07:29 deraadt * mail.1: and mailx too.. 1998-06-12 18:07 millert * collect.c, lex.c, popen.c: back out some signal changes that can cause mail to hang when quitting due to SIGCHLD blockage 1998-06-12 17:51 millert * v7.local.c, fio.c, quit.c, popen.c: Don't call truncate() directly; have rm() do it if we get EPERM on unlink() In popen.c, findchild() may return NULL so catch that case. 1998-06-12 17:15 millert * v7.local.c: Properly delete messages that the user has deleted in his/her spool. I fudged up the logic when I replaced an unlink with a truncate. 1998-06-11 06:20 deraadt * fio.c: Don't segfault just because a line starts with NUL; ross 1998-05-11 04:15 millert * cmd1.c: fix scrolling and 'z' command; matt debergalis 1998-05-04 05:37 millert * collect.c, lex.c, popen.c, v7.local.c: Never remove a mail spool, as we may not have proper prics, just truncate. Also block signals in a few critical areas 1998-04-25 00:41 deraadt * mail.1: doc startup behaviour; koshy@india.hp.com 1998-04-25 00:19 deraadt * mail.1: fix usage; ru@ucb.crimea.ua 1998-03-24 05:40 deraadt * mail.1: prettty 1998-02-15 21:20 niklas * popen.c: Remove one case of malloc call from sighandler 1997-11-14 00:23 millert * aux.c, cmd1.c, cmd2.c, cmd3.c, collect.c, edit.c, extern.h, fio.c, head.c, lex.c, list.c, mail.1, main.c, names.c, popen.c, quit.c, send.c, strings.c, temp.c, tty.c, vars.c: NetBSD changes (mostly comsmetic): replace panic() with calls to err()/errx() use S_IS* instead of doing by hand with S_IF*. Use TIMESPEC_TO_TIMEVAL() and gettimeofday instead of time(2) Use _POSIX_VDISABLE, not 0 Kill register 1997-11-13 03:30 millert * tty.c: Add back EXTPROC code now that tty_pty.c has the lite2 fix. 1997-11-04 08:34 deraadt * mail.1: unbalanced parenthesis around command abbreviation in mail.1; h-nokubi@nmit.tmg.nec.co.jp 1997-09-21 11:49 deraadt * Makefile: $OpenBSD$ 1997-09-04 20:44 millert * fio.c: Deal with pairs in mailboxes so we can work with eudora mail spools mounted from DOS/Windoze. From Matt Thomas . 1997-08-31 14:32 millert * cmd2.c, fio.c, popen.c: Kill union wait. 1997-08-05 04:00 deraadt * popen.c: pull errno.h in 1997-08-04 19:25 deraadt * popen.c: save errno in sigchld handlers 1997-08-04 17:30 millert * aux.c, list.c: Fix a problem in skin() that was introduced with the buffer oflow fix. Could end up realloc'ing the wrong thing. 1997-07-31 17:55 millert * tty.c: Remove TIOCEXT added in lite2 merge for now. Causes problems when mail(1) is used over a telnet session. 1997-07-31 02:48 millert * names.c: Another static buffer bytes the dust. 1997-07-31 02:36 millert * aux.c, list.c: Document an assumption and kill a static buffer. 1997-07-30 07:19 millert * aux.c, cmd2.c, cmd3.c, collect.c, extern.h, lex.c: Make istrcpy() take a size (not length) field, now called istrncpy(). Change some strcpy() -> strncpy() out of paranoia. 1997-07-30 06:32 millert * cmd1.c, cmd3.c, collect.c, extern.h, lex.c, main.c, tty.c, v7.local.c: Fix one possible oflow (not exploitable) and do a wee bit of KNF. Much more remains to be done. 1997-07-28 15:20 millert * aux.c, fio.c: Dynamically allocate space for addr header strings instead of using BUFSIZ. We know that the end size will be <= to the start size so it is simple to preallocate enough space. Fixes NetBSD PR#3028 1997-07-28 10:01 deraadt * Makefile: install mail.rc at distribution time; bug found by explorer@flame.org 1997-07-25 21:05 mickey * aux.c: #if __STDC__ --> #ifdef __STDC__ 1997-07-24 17:27 millert * cmd1.c, collect.c, edit.c, extern.h, fio.c, lex.c, names.c, quit.c, send.c, temp.c: tempnam(3) goes bye bye. 1997-07-24 16:23 millert * extern.h, fio.c, lex.c, quit.c, temp.c: Replace 3 tempnam()'s with mkstemp. The two left look tricky. 1997-07-22 19:13 millert * lex.c: incfile() needs to lock the mail spool so it doesn't get partial messages. Noticed by Theo. 1997-07-22 19:09 deraadt * dotlock.c: locking is done differently now 1997-07-22 18:54 millert * cmd1.c, collect.c, extern.h, send.c, tty.c: grabh() now returns SIGINT if it was interrupted (previously always returned 0 and the return val was always ignored). Add gethfromtty() to get a header (using grabh) from the tty and quit on two ^C's. Use gethfromtty() when getting Subject, Cc, and Bcc headers so we can quit nicely. Closes PR #291. Don't use longs where it doesn't make sense. 1997-07-22 18:26 millert * collect.c: Only require 2 ^C's at Subject: prompt to quit as it is supposed to. Also in Subject: prompt, when we get that first ^C re-prompt for the Subject: like SunOS does so the user knows what is going on. 1997-07-22 06:46 millert * lex.c: Release signals when we get an error condition in incfile(). 1997-07-18 18:12 millert * glob.h: Change jmp_buf to sigjmp_buf that I missed in the last sweep. 1997-07-14 16:09 millert * popen.c: Don't call it a mask when it is a sigset_t (cosmetic changes only). 1997-07-14 15:56 millert * collect.c, main.c, popen.c, send.c, tty.c: Convert remaining sigsetmask() -> sigprocmask() (POSIX style) in collect.c and fix up some signal botches elsewhere. 1997-07-14 00:24 millert * aux.c, cmd1.c, cmd2.c, cmd3.c, collect.c, def.h, edit.c, fio.c, getname.c, head.c, lex.c, list.c, main.c, names.c, popen.c, quit.c, send.c, strings.c, temp.c, tty.c, v7.local.c: NOSTR -> NULL Use sigsetjmp/siglongjmp instead of sigjmp/longjmp for portability. 1997-07-13 23:53 millert * aux.c, cmd1.c, cmd2.c, cmd3.c, collect.c, dotlock.c, edit.c, fio.c, lex.c, main.c, names.c, popen.c, quit.c, send.c, strings.c, tty.c, vars.c: bcopy() -> memcpy() and fix some casts. 1997-07-13 23:35 millert * USD.doc/: Makefile, mail2.nr, mail4.nr, mail5.nr, mail6.nr, mail8.nr, mail9.nr: Update from 44.BSD-lite2 1997-07-13 21:21 millert * aux.c, cmd1.c, cmd2.c, cmd3.c, cmdtab.c, collect.c, def.h, dotlock.c, edit.c, extern.h, fio.c, getname.c, head.c, lex.c, list.c, mail.1, main.c, names.c, popen.c, quit.c, send.c, strings.c, temp.c, tty.c, v7.local.c, vars.c: Merge in NetBSD and 4.4BSD-lite2 changes as well as some of my own. - handle long lines safely (from NetBSD) - use puts/fputs and putchar/putc when it makes sense - use err/errx and warn/warnx when it makes sense - make return() and sizeof() style consisten - some more buffer safety 1997-06-18 23:52 deraadt * version.c: crank version number, we have made a few changes... 1997-06-16 20:57 millert * v7.local.c: Use buflen, not sizeof(buf) as buf is a pointer. 1997-06-02 17:00 dm * v7.local.c: buflen != sizeof (char *) 1997-05-30 08:51 deraadt * aux.c, cmd1.c, cmd3.c, extern.h, fio.c, lex.c, list.c, popen.c, v7.local.c: overflows abound 1997-04-27 20:56 millert * Makefile: COPY -> INSTALL_COPY and STRIP -> INSTALL_STRIP This fixes namespace problems where STRIP is sometimes used as the name of the strip(1) to use and other times used as the flag to send install(1) when stripping (or not). COPY doesn't have this problem (yet) but was poorly named. 1997-04-13 20:32 deraadt * collect.c: single ^C on a pipe 1997-04-13 20:22 deraadt * collect.c: do not (continue) on a stdin pipe 1997-04-10 15:33 deraadt * collect.c: how is this for fast bug fixing response! revert to sigblock() since the sigprocmask() code was not equivelant. report from grr@shandakor.tharsis.com, PR#154 1997-03-29 03:01 millert * Makefile, cmd1.c, cmd3.c, def.h, extern.h, fio.c, pathnames.h, popen.c, quit.c, temp.c: Use ``mail.local -H'' to do dot locking so we can have mode 755 mail spool, change an occurrence of tempnam() to mkstemp(), change some longs and shorts to ints. Mail is now usable again. 1997-02-03 00:25 deraadt * def.h: use a long line counter, netbsd pr#3083, rhialto@polder.ubc.kun.nl 1997-01-17 07:12 millert * aux.c, fio.c, lex.c, list.c, names.c: r?index -> strr?chr 1997-01-15 23:42 millert * main.c: getopt(3) returns -1 when out of args, not EOF, whee! 1997-01-13 20:36 deraadt * mail.1: doc "more" command; jdc@orthanc.ncl.ac.uk 1996-12-08 14:32 downsj * Makefile: install -> ${INSTALL}, -c -> ${COPY} 1996-10-28 00:42 millert * temp.c: Ignore $HOME if > MAXPATHLEN 1996-10-26 05:11 millert * mail.1, v7.local.c: honor $LOGNAME 1996-09-16 02:26 deraadt * main.c, temp.c: _PATH_TMP -> _PATH_TMPFILE; avoid /tmp//fooXXXX where possible too 1996-06-26 21:22 dm * popen.c: Accept NULL nset in prepare child (as run_editor will try to use one). 1996-06-11 12:53 deraadt * Makefile, aux.c, cmd1.c, cmd2.c, cmd3.c, cmdtab.c, collect.c, def.h, dotlock.c, edit.c, extern.h, fio.c, getname.c, glob.h, head.c, lex.c, list.c, mail.1, main.c, names.c, pathnames.h, popen.c, quit.c, rcv.h, send.c, strings.c, temp.c, tty.c, v7.local.c, vars.c, version.c, USD.doc/Makefile, USD.doc/mail0.nr, USD.doc/mail1.nr, USD.doc/mail2.nr, USD.doc/mail3.nr, USD.doc/mail4.nr, USD.doc/mail5.nr, USD.doc/mail6.nr, USD.doc/mail7.nr, USD.doc/mail8.nr, USD.doc/mail9.nr, USD.doc/maila.nr: from christos; - Fix PR/105: Implement dot locking protocol and check return value of flock. - Fix PR/2247: Don't call unknown users "ubluit". Issue an error message. - Fix/add prototypes. - Fix warnings. - Use POSIX signal mask calls. 1996-03-27 19:32 niklas * Makefile, cmd1.c, cmdtab.c, extern.h, lex.c: From NetBSD: merge of 960317 1995-10-18 08:45 deraadt * Makefile, aux.c, cmd1.c, cmd2.c, cmd3.c, cmdtab.c, collect.c, def.h, edit.c, extern.h, fio.c, getname.c, glob.h, head.c, lex.c, list.c, mail.1, main.c, names.c, pathnames.h, popen.c, quit.c, rcv.h, send.c, strings.c, temp.c, tty.c, v7.local.c, vars.c, version.c, USD.doc/Makefile, USD.doc/mail0.nr, USD.doc/mail1.nr, USD.doc/mail2.nr, USD.doc/mail3.nr, USD.doc/mail4.nr, USD.doc/mail5.nr, USD.doc/mail6.nr, USD.doc/mail7.nr, USD.doc/mail8.nr, USD.doc/mail9.nr, USD.doc/maila.nr, misc/mail.help, misc/mail.rc, misc/mail.tildehelp: Initial revision 1995-10-18 08:45 deraadt * Makefile, aux.c, cmd1.c, cmd2.c, cmd3.c, cmdtab.c, collect.c, def.h, edit.c, extern.h, fio.c, getname.c, glob.h, head.c, lex.c, list.c, mail.1, main.c, names.c, pathnames.h, popen.c, quit.c, rcv.h, send.c, strings.c, temp.c, tty.c, v7.local.c, vars.c, version.c, USD.doc/Makefile, USD.doc/mail0.nr, USD.doc/mail1.nr, USD.doc/mail2.nr, USD.doc/mail3.nr, USD.doc/mail4.nr, USD.doc/mail5.nr, USD.doc/mail6.nr, USD.doc/mail7.nr, USD.doc/mail8.nr, USD.doc/mail9.nr, USD.doc/maila.nr, misc/mail.help, misc/mail.rc, misc/mail.tildehelp: initial import of NetBSD tree