Commit Graph

293 Commits

Author SHA1 Message Date
christos
f49cbbddb9 avoid longjmp clobber. 2013-10-18 20:17:59 +00:00
christos
8e33b891d8 prevent re-entry race and crash 2013-06-28 17:36:18 +00:00
christos
d8eb8720ff Document more environment settings. 2013-03-09 19:43:20 +00:00
christos
4b1752e245 undo previous; mail never expanded $ variables in folder. 2013-03-09 19:43:07 +00:00
christos
b209824667 since we are calling realpath() earlier now, we need to expand the name
of the folder in case it contained variables like $HOME.
2013-03-06 20:49:20 +00:00
christos
3157acd0cf PR/47577: Steffen "Daode" Nurpmeso: Refinement to previous to keep always
keep track of the folder when it is updated.
2013-02-20 14:38:13 +00:00
christos
b078433469 PR/47577: Steffen "Daode" Nurpmeso: Keep a resolved folder name together
with a display name in order to keep track of current state when the directory
is changed.
2013-02-19 17:43:32 +00:00
christos
ba2b5111fb PR/47657: Steffen "Daode" Nurpmeso: quoted printable CTE exceeds RFC limit.
- Encapsulated all the content-transfer-encoding stuff in mime_codecs.c
- Replaced calls of strtol(3) with a handcrafted version that allows simple
  error checking by testing the return value. This allows to easily add
  special code to handle illegal QP sequences.
2013-02-14 18:23:45 +00:00
christos
39fb5ccbf5 From: Steffen "Daode" Nurpmeso:
Amend the previous commit to support zone-style RFC 822 dates.
RFC 5322 marks this zone-style as obsolete (obs-zone), but still supports it.
But then, even if you don't wanna support military style single-letter zones,
the UT zone exists and will not be supported by this commit.

The changes here are not strictly correct (since not all possible
single-letter zones are assigned, and only *UT* has two letters),
but which will match all thre possible *obs-zone* forms.
Compiled and tested on a single MBOX.
2013-01-16 15:21:42 +00:00
christos
8fe0b6ad43 PR/47453: Martin Branderburg: Mail (mail, mailx) does not recognize messages
which have RFC 822 format dates.
XXX: Pullup 6
2013-01-15 17:25:42 +00:00
christos
fed1477544 PR/47396: Steffen: mail(1) may falsely use quoted-printable for files with
embedded NULs
2013-01-04 01:54:55 +00:00
christos
ec0bd15985 PR/47395: Steffen: mail(1) unnecessarily uses base64 if a CR without a LF is seen 2013-01-04 01:43:59 +00:00
mbalmer
e3f283b63f Fix misspelling: accommodate is a long enough word to have room for two 'c's
and two 'm's.
2012-12-01 11:41:49 +00:00
christos
79abd5ecae PR/47237: Steffen Nurpmeso: Detect more than 2 pad characters and mark as bad. 2012-11-24 21:40:02 +00:00
christos
de5e815cfc don't check for i and use j. 2012-10-21 22:18:16 +00:00
christos
1db8a1b54a PR/47098: Steffen "Daode" Nurpmeso: mail(1): SEGV with bad globbed file argument 2012-10-21 01:11:23 +00:00
christos
0575918243 consistently use warn 2012-10-21 01:10:22 +00:00
christos
a7879b44e9 make sure that signal handlers are always initialized. 2012-06-12 19:03:26 +00:00
christos
5942983d76 set close on exec for all opened files. 2012-04-29 23:50:22 +00:00
joerg
cdaeb35ee5 Mark sasprintf as using a printf-like format. Fix format string to use
all arguments by telling the user what file would be overwritten.
2012-02-28 22:30:44 +00:00
christos
7f5fd4a5cd PR/45842: Henning Petersen: compare fgets with NULL not 0 2012-01-16 17:38:16 +00:00
joerg
6818646ac8 Use __dead 2011-09-16 15:39:25 +00:00
christos
abf73dc18d document non-literal format string 2011-08-16 11:49:17 +00:00
joerg
a5bcf1850f Use proper format strings. 2011-05-24 12:33:22 +00:00
dyoung
c45c4e89a1 Rename sigqueue to sigq to avoid clashing with sigqueue(2). Now this
builds again.
2011-01-10 17:14:38 +00:00
njoly
1adf1b7dc0 Fix sub-section reference. 2010-12-23 20:11:00 +00:00
christos
02bc858973 - fix format print issue. from anon ymous 2010-06-21 19:49:31 +00:00
joerg
06ff5ce94c Explicitly quote |. Don't use .%T outside the scope of .Rs/.Re. 2010-05-14 16:23:42 +00:00
joerg
5180429ad8 Use \e 2010-03-21 13:34:34 +00:00
roy
98eb889579 Userland now builds and uses terminfo instead of termcap.
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
christos
d449716afd error message cleanup
- 1 -> EXIT_FAILURE
- fprintf(stderr, -> warnx(
- better warning messages
2010-01-12 14:45:31 +00:00
christos
b8afdde726 - 1 -> EXIT_FAILURE
- avoid assertion firing when hitting ^D in CC: line.
2010-01-12 14:44:24 +00:00
christos
533d2abbab - 1 -> EXIT_FAILURE
- preallocate child struct, since the signal handler can be called before
  wait_child, and we cannot allocate a child struct there. there is a signal
  race still here if the program exits and the signal handler is called before
  we allocate the struct.
2010-01-12 14:43:31 +00:00
snj
550147bd6a Remove 3rd and 4th clauses in christos' license. OK christos. 2009-10-21 01:07:44 +00:00
christos
1ed23800b4 Don't barf on malformed mime messages (missing mime version). From Anon Ymous 2009-08-28 14:26:50 +00:00
apb
3ac228d1b2 Declare "com" as volatile in execute(), to make it safe to use
across setjmp/longjmp.

Inspired by PR 41255 from Kurt Lidl, but this change makes "com" a
volatile pointer to const non-volatile data, whereas the PR made it a
non-volatile pointer to const volatile data.
2009-07-14 21:15:48 +00:00
lukem
c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
he
ec30dc689c Do the -Wuninitialized workaround in a way which conforms to our
style guide, and remove a now unneeded LINTED comment.  From private
feedback.
2009-04-13 10:03:58 +00:00
he
a389f78e47 Work around a problem with gcc -Wuninitialized seen for our sh3 targets. 2009-04-12 22:47:39 +00:00
christos
27b54bd918 - magic fix for short files
- knf
from Anon Ymous
2009-04-11 14:22:32 +00:00
christos
ca13337dfe From Anon Ymous:
- Remove all longjmp(3) calls from signal handlers.  Instead, we post
to an internal signal queue and check that periodically.  All signal
related code is now in sig.c, except for the SIGCHLD handler which
remains in popen.c as it is intimately tied to routines there.

- Handle SIGPIPE in type1() regardless of mime support, or else the
handler in execute() will prevent our error code from being returned
resulting in 'sawcom' not being set on the first command as it should.
This only affected the initial behavior of the "next" command without
mime support.

- Add the 'T' flag to many commands in cmdtab.c that should not look
like the first command.  E.g., start mail on a mailbox with multiple
messages, run "set foo", then "next", and watch the second message get
displayed rather than the first as is the case without the first "set"
command.

- Add file descriptor and file handle leak detection.  Enabled by
DEBUG_FILE_LEAK.  This will likely disappear in the future.

- Fix a long standing (since import in 1993) longjmp() bug in
edstop(): the jmpbuf was invalid when quit() is called at the end of
main.

- Fix a long standing bug (since import in 1993) in snarf() where it
didn't strip whitespace correctly if the line consisted only of
whitespace.

- Lint cleanup.

- New Feature: "Header" command.  This allows miscellaneous header
fields to be added to the header, e.g., "X-Organization:" or
"Reply-To:" fields.

- New Feature: "page-also" variable.  This allows the specification of
additional commands to page.  It is more flexible than "crt".

- Document the "pager-off" variable: if set, it disables paging
entirely.
2009-04-10 13:08:24 +00:00
joerg
5d8c8ad0cf Fix quoting. 2009-03-23 17:02:06 +00:00
christos
df68463076 fix warnings. 2009-03-11 01:10:05 +00:00
christos
71735a83f7 add missing , 2009-02-11 19:22:22 +00:00
christos
26114345a6 don't print warnings about can't find termcap entry. 2009-02-11 19:10:08 +00:00
lukem
1742612d3c sign-compare fix for amd64 2009-01-25 14:07:18 +00:00
lukem
c172e3b989 fix -Wsign-compare issues 2009-01-18 01:29:57 +00:00
wiz
be47919875 Spelling fixes. 2008-12-08 11:32:18 +00:00
christos
c78e2d1227 PR/1880: Jim Barnard: Don't parse backslash escaped characters inside single
quoted strings.
2008-12-07 19:21:00 +00:00
christos
c6f8f3a3b2 PR/1880: Jim Barnard: Pass backslash escaped characters unintepreted inside
single quoted strings. Document new behavior, and its relationship with POSIX.
2008-12-07 19:17:09 +00:00