summaryrefslogtreecommitdiff
path: root/usr.bin/mail
AgeCommit message (Collapse)Author
2001-12-18We need to adjust where "dot" points when we realloc(message).Todd C. Miller
Problem found by Mike Heffner of the FreeBSD project.
2001-11-28Catch SIGINT in sendmessage() so user can interupt a long messageTodd C. Miller
that is being output. Make statusput() return an int and return -1 if ferror()
2001-11-28Fix typo; SIGTTIN where SIGINT meant and rename a variable for clarity.Todd C. Miller
2001-11-23Revert change to Popen() to only wrap command in a shell if itTodd C. Miller
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-21o kill strcpy()Todd C. Miller
o check return values of malloc and friends o use strdup() when sensible
2001-11-21fix arg reversal that was introduced during ANSIficationTodd C. Miller
2001-11-21Fix extern decl of version missed in previous commit.Todd C. Miller
2001-11-21o ANSIfyTodd C. Miller
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-20In private version of popen(), only wrap a command to be run in aTodd C. Miller
shell if it contains meta chars. Sneaky hack to work around a ksh bug.
2001-11-20Major signal overhaul. We no longer longjmp all over the place.Todd C. Miller
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-17properly bail out of incfile(); millert okTheo de Raadt
2001-11-16Instead of using a longjmp to catch SIGPIPE, just set to SIG_IGN andTodd C. Miller
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-11missing arg to errxTodd C. Miller
2001-10-04Fix path to /bin/ls; ok millertPeter Valchev
2001-09-16Optimize space-eating loop since we've already checked that theTodd C. Miller
first char is a space. Patch from sacrificial-spam-address@horizon.com
2001-09-161) In skin(), only add a space after a comma if there is actually a spaceTodd C. Miller
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-07Sanity check length of -u argument to avoid truncation later on.Todd C. Miller
2001-09-04Fix bogus use of snprintf return value. Since we know the maxTodd C. Miller
length of a username we can use that as part of the buffer size.
2001-06-23Remove evil #ifdef __GNUC__ garbage to avoid longjmp clobbering andTodd C. Miller
use volatile instead.
2001-01-19More fixes from Don Beusee:Todd C. Miller
- 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-16Changes from Don Beusee:Todd C. Miller
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-16Changes from Don Beusee:Todd C. Miller
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-09Change all option list specifications to ".Bl -tag -width Ds". Most manAaron Campbell
pages just needed their -width parameter tweaked to "Ds", which provides a nice width of 6 constant characters. For consistency more than anything.
2000-08-23repair sendmail options handlingMichael Shalayeff
2000-08-02$HOME paranoia: never use getenv("HOME") w/o checking for NULL and non-zeroTodd C. Miller
2000-07-06printf with % for the promptTheo de Raadt
2000-06-30warnx?/errx? paranoia (use "%s" not a bare string unless it is aTodd C. Miller
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-26fix pasto; noted by artHugh Graham
2000-06-11newaliases(1) -> newaliases(8)Todd C. Miller
2000-05-15/etc/mail/aliasesTheo de Raadt
2000-04-26Change the name of mail's send() function to sendmessages() toTodd C. Miller
avoid shadowing the libc send(2); gadams@avernus.com
2000-04-25When incorporating new messages, clear the "new" count before theTodd C. Miller
inc so the count of new messages is useful afterwards. This makes mail behave more like the SunOS version in this respect.
2000-04-12Trailing whitespace begone!Aaron Campbell
2000-03-24Correct the HISTORY section to note that this command appeared in Version 5Aaron Campbell
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-23When calling sendmail, use "--" to indicate end of command line arguments.Todd C. Miller
This prevents someone from sneaking arbitrary args to sendmail via the Reply-To: or From: lines.
2000-03-10Various cleanups and standardization.Aaron Campbell
2000-03-04Try to standardize the options list introduction; it should read "The optionsAaron Campbell
are as follows:", except in special cases.
1999-10-16Formatting fixes.Aaron Campbell
1999-06-05- remove trailing white spaceAaron Campbell
- 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-12grammar police: do not hyphenate compound words that act as adjectives if theAaron Campbell
first word ends in -ly i.e., fully-qualified, newly-created, globally-visible, etc. are wrong
1998-11-19significant cleanup; also s/INTRODUCTION/DESCRIPTION/, in particular for man -hAaron Campbell
1998-11-11remove redundant .Pp macrosAaron Campbell
1998-09-27mail -u foo is not really the same as mail -f /var/mail/fooTodd C. Miller
1998-09-27Use new username option to lockspool for 'mail -u'.Todd C. Miller
1998-09-26usr.bin/ man page fixes, f-m.Aaron Campbell
1998-09-13typosAaron Campbell
1998-09-12document reality.Todd T. Fries
1998-09-10.Xr lockspool 1Todd C. Miller
1998-09-10Fix commentsTodd C. Miller
1998-09-10If a child has not been waited on via the SIGCHLD handler, wait for itTodd C. Miller
ourselves instead of playing games with sigsuspend. This may fix PR 588.