David Levine [Sat, 25 Jan 2014 15:15:05 +0000 (09:15 -0600)]
Replaced boilerplate at beginning of each nmh program with new
nmh_init() function. It sets up an atexit() function and signal
handlers so that all temporary files are removed when the program
terminates, however that happens. It relies on a call in m_mktemp()
to register each temporary file for removal. See new "nmh temporary
files" section in README.developers and comments in m_mktemp.c.
David Levine [Sat, 25 Jan 2014 03:10:03 +0000 (21:10 -0600)]
Removed 3 renames of temporary files in mhparse.c. They added
unnecessary filename extensions to the temp files. They weren't good
from a security standpoint and added a failure mode.
Ken Hornstein [Fri, 24 Jan 2014 17:38:03 +0000 (12:38 -0500)]
In my over-eager trimming I didn't realize the fallback code that
used the mhshow-suffix configuration information to determine the
MIME type was removed; put that back into mime_type().
David Levine [Fri, 24 Jan 2014 04:16:34 +0000 (22:16 -0600)]
Replaced use of mkstemp() with m_mktemp2() in header_fd() of
rcvtty.c. It never would have worked, anyway, because it had 5
instead of 6 X's in the template.
Ken Hornstein [Wed, 22 Jan 2014 20:22:07 +0000 (15:22 -0500)]
Convert whatnow over to using the new Attach header.
Mark the old -attach switches as deprecated (and make them not show
up in help). Still more documentation cleanup to do.
Ken Hornstein [Wed, 22 Jan 2014 03:35:35 +0000 (22:35 -0500)]
Make viamail read the user's profile; this is required because sendsbr()
wants to call mhbuild, which can be overridden via the user's profile
(which is required for the test suite to work).
David Levine [Wed, 22 Jan 2014 02:55:57 +0000 (20:55 -0600)]
Always check that mktemp()/mktemp2() succeeds before trying to
use result. And if it fails, have the error message report
the directory where the failed temporary file creation occurred.
And, removed all chmod()'s of temporary files created by mktemp()/
mktemp2() because they set the umask to 077 before calling mkstemp(3).
David Levine [Tue, 21 Jan 2014 03:08:47 +0000 (21:08 -0600)]
Replaced use of m_mktemp() with m_mktemp2() so that tmp files created
by attach, burst, mhbuild, and post will be in the directory specified
by the first non-null of {MHTMPDIR, TMPDIR, TMP, MH Path directory}.
David Levine [Mon, 20 Jan 2014 16:31:16 +0000 (10:31 -0600)]
Fixed three LC_ALL settings:
1) Replaced en_US.ISO8859-1 with C because that's sufficient to show
decoding with an invalid multibyte sequence.
2) Removed redundant LC_ALL=en_US.UTF-8; that is set for the entire test.
3) Removed the last en_US.ISO8859-1 because it hid what the test was
trying to show.
David Levine [Mon, 20 Jan 2014 05:21:51 +0000 (23:21 -0600)]
Removed "tmp" from the uip/mh* programs, so that they no longer
use the nmh-storage profile component for their tmp files. Or
their invoname, but that will be taken care of later.
David Levine [Fri, 17 Jan 2014 03:48:01 +0000 (21:48 -0600)]
Moved readline check to after termcap/curses check in configure.ac.
This way, $TERMLIB can be included in the readline check. That's
neeed on CentOS 5.9.
David Levine [Fri, 17 Jan 2014 01:55:58 +0000 (19:55 -0600)]
Moved readconfig() of mhn.defaults into construct_build_directive().
This way, platforms that don't define MIMETYPEPROC will display
the proper directive with attach -v.
David Levine [Wed, 15 Jan 2014 02:09:40 +0000 (20:09 -0600)]
Added check to get_file_info() in attach.c for failed fgets() call.
It can happen on Cygwin for mysterious reasons,
http://cygwin.com/faq/faq.html#faq.using.bloda.
David Levine [Thu, 9 Jan 2014 02:54:50 +0000 (20:54 -0600)]
OpenBSD 5 needs an other-libraries (fourth argument) to the
AC_CHECK_LIB for SSL_library_init, because it doesn't automatically
append -lcrypto when linking with -lssl.
David Levine [Thu, 9 Jan 2014 02:14:57 +0000 (20:14 -0600)]
Hard-code the config/version.c target, instead of using $@, so its
rule works for the distcheck target with Solaris (System V) make.
distcheck uses VPATH, causes that make to prepend the VPATH to $@.