]> diplodocus.org Git - nmh/log
nmh
5 years agoReplace GNUism with standard touch flag in test-scan-file.
Eric Gillespie [Sat, 19 Sep 2020 22:44:31 +0000 (17:44 -0500)]
Replace GNUism with standard touch flag in test-scan-file.

5 years agoDocument the -port flag. Text copied from inc.man .
Eric Gillespie [Sat, 19 Sep 2020 22:03:44 +0000 (17:03 -0500)]
Document the -port flag.  Text copied from inc.man .

5 years agoFixed memory corruption in post(1) and inc(1) when using XOAUTH2.
David Levine [Fri, 11 Sep 2020 00:55:26 +0000 (20:55 -0400)]
Fixed memory corruption in post(1) and inc(1) when using XOAUTH2.

An internal table for the oauth entries was initially sized at 4,
and then reallocated if the user had more than 4.  However, the
reallocation didn't account for the size of the allocated
structure.

Also, increased the initial size to 16, trading off slightly
increased memory usage for performance.

Fix to commit 29ff4f879.

5 years agoAdded start_test/finish_test to a bunch of tests.
David Levine [Mon, 25 May 2020 18:19:35 +0000 (14:19 -0400)]
Added start_test/finish_test to a bunch of tests.

5 years agoReplaced use of snprintf() with memcpy()/memmove().
David Levine [Sun, 10 May 2020 15:20:04 +0000 (11:20 -0400)]
Replaced use of snprintf() with memcpy()/memmove().

gcc 10 noticed overlap of source and destination in snprintf() args.

6 years agoAdded many flags to CFLAGS with gcc, if supported.
David Levine [Sun, 15 Mar 2020 23:11:53 +0000 (19:11 -0400)]
Added many flags to CFLAGS with gcc, if supported.

6 years agoAdded check for passing null argument to printf(3) %s directive.
David Levine [Sun, 15 Mar 2020 21:35:55 +0000 (17:35 -0400)]
Added check for passing null argument to printf(3) %s directive.

This fixed "directive argument is null" warnings found by gcc
-Wformat-overflow.

6 years agoRefined number of bytes copied to buffer in several places.
David Levine [Sun, 15 Mar 2020 21:18:58 +0000 (17:18 -0400)]
Refined number of bytes copied to buffer in several places.

This fixed "output may be truncated writing up to [m] bytes
into a region of size [n]" warnings found by gcc -Wformat-truncation.

6 years agoSubtracted 1 from size argument in some calls to strncpy(3).
David Levine [Sun, 15 Mar 2020 21:14:36 +0000 (17:14 -0400)]
Subtracted 1 from size argument in some calls to strncpy(3).

This fixed "specified bound [n] equals destination size" warnings
found by gcc -Wstringop-truncation.

Also, fixed harmless copy-and-paste error (sizeof(tmpfil) instead
of sizeof(drft) in uip/rcvdist.c) introduced in commit 2f689a1cb.

6 years agopatch: Maildir support for "scan -file"
Stephen Gildea [Mon, 17 Feb 2020 19:02:49 +0000 (11:02 -0800)]
patch: Maildir support for "scan -file"

I have extended the "scan -file" command line so that the "file" can
also be a Maildir directory.

This feature complements the Maildir support added to the inc command
in 1.4.  Just as you may want to inc your mail from Maildir, you might
want to see what awaits you with a scan first.

Signed-off-by: David Levine <levinedl@acm.org>
6 years agoRemoved unused fail label.
David Levine [Mon, 20 Jan 2020 18:53:35 +0000 (13:53 -0500)]
Removed unused fail label.

Also, moved new tests to end of file.  Update to commit b7416e7959.

6 years agoPatch for mhical to support "BYDAY=-1SU"-type RRULEs.
Conrad Hughes [Tue, 14 Jan 2020 10:01:46 +0000 (10:01 +0000)]
Patch for mhical to support "BYDAY=-1SU"-type RRULEs.

Notes:

- Added dmlastday() function to dtime.c, to obtain last day of month.
  Minor modifications to other parts here to reuse code.

- Modified rrule_clock() in datetime.c to handle negative BYDAY
  correctly.

- Added a couple of tests.

- Mainly this is to scratch an itch since UK timezone history makes
  heavy use of BYDAY=-1SU-type RRULEs, and the resultant complaints
  are annoying.  I had a brief look at "properly" extending
  icalparse.y, but I kindof think any serious extension of mhical
  should really instead adopt libical?

6 years agoFixed file descriptor leak in mhfixmsg when run on multiple input files.
Conrad Hughes [Thu, 26 Dec 2019 22:29:59 +0000 (17:29 -0500)]
Fixed file descriptor leak in mhfixmsg when run on multiple input files.

6 years agoFixed source charset in mhfixmsg textcharset verbose output.
David Levine [Wed, 25 Dec 2019 23:15:06 +0000 (18:15 -0500)]
Fixed source charset in mhfixmsg textcharset verbose output.

Thanks to Conrad Hughes for reporting this bug.

6 years agoRemoved obsolete spec for default password with -sasl for POP.
David Levine [Sat, 7 Dec 2019 16:16:52 +0000 (11:16 -0500)]
Removed obsolete spec for default password with -sasl for POP.

It was obsoleted by commit 90edb255effd0d2.

6 years agoInclude proper header without READLINE_SUPPORT.
David Levine [Fri, 8 Nov 2019 02:49:30 +0000 (21:49 -0500)]
Include proper header without READLINE_SUPPORT.

6 years agoRestored file execute permissions.
David Levine [Wed, 23 Oct 2019 23:08:46 +0000 (19:08 -0400)]
Restored file execute permissions.

Fix to commit 62b9266aa31b2baced3252987b256b4e43ec9573.

6 years agoRemoved --depth 1 from git clone invocation.
David Levine [Wed, 23 Oct 2019 23:06:19 +0000 (19:06 -0400)]
Removed --depth 1 from git clone invocation.

That caused git describe in config/version.sh to fail.

6 years agoUpdated documentation and comments about sendmail/pipe.
David Levine [Sun, 20 Oct 2019 15:14:46 +0000 (11:14 -0400)]
Updated documentation and comments about sendmail/pipe.

6 years agoImprove POP SASL error handling
Ken Hornstein [Thu, 17 Oct 2019 01:37:19 +0000 (21:37 -0400)]
Improve POP SASL error handling

Handle the case where we get an -ERR message during the SASL exchange.

6 years agoPass command line arguments first from rtm() to rt() to support its args.
David Levine [Tue, 8 Oct 2019 23:04:36 +0000 (19:04 -0400)]
Pass command line arguments first from rtm() to rt() to support its args.

6 years agoRemove X.400 address parsing
Ken Hornstein [Wed, 2 Oct 2019 15:39:21 +0000 (11:39 -0400)]
Remove X.400 address parsing

Remove the X.400 address parsing used by the %(friendly) format escape.
Because ... you know, it's 2019 and X.400.

6 years agoadd documentation on friendly function
Michael Richardson [Mon, 30 Sep 2019 15:06:16 +0000 (11:06 -0400)]
add documentation on friendly function

6 years agoChange the default for noverify
Ken Hornstein [Mon, 30 Sep 2019 22:23:51 +0000 (18:23 -0400)]
Change the default for noverify

The default for 'noverify' should be 'false'.  The certificate chain
SHOULD be verified by default.

6 years agoAdded warning if the profile contains a post entry.
David Levine [Sun, 25 Aug 2019 13:08:25 +0000 (09:08 -0400)]
Added warning if the profile contains a post entry.

Added warning from all programs that read the profile if the profile
contains a post entry, which is ignored, but does not contain a
postproc entry.  In other words, if you get this warning and want
to suppress it, your options include:
1) Remove your post profile entry.
2) Make your post profile entry a comment by prepending it with the #:
   comment indicator.
3) Add a postproc entry that points to the post that you use.  That can
   be viewed with "mhparam postproc".

6 years agoMoved run_without_input() from test-version-check to common.sh.in.
David Levine [Sun, 25 Aug 2019 12:56:04 +0000 (08:56 -0400)]
Moved run_without_input() from test-version-check to common.sh.in.

6 years agoRemoved unnecessary warning about missing semicolon.
David Levine [Sun, 25 Aug 2019 12:49:53 +0000 (08:49 -0400)]
Removed unnecessary warning about missing semicolon.

The warning was for Content-Type and Content-Disposition, and was
incorrect.  Thanks to Tom for providing output with it.  Also
removed multiple trailing newlines from warning output, thanks to
Ralph for tracking those down.

6 years agoAdded test of encoded Resent-To: and Resent-cc:.
David Levine [Sat, 10 Aug 2019 22:50:39 +0000 (18:50 -0400)]
Added test of encoded Resent-To: and Resent-cc:.

6 years agoNo longer need trailing space after CFLAGS variable assignment.
David Levine [Sun, 4 Aug 2019 22:25:50 +0000 (18:25 -0400)]
No longer need trailing space after CFLAGS variable assignment.

6 years agoReorder configure options to be before variables
Ken Hornstein [Sun, 28 Jul 2019 01:22:12 +0000 (21:22 -0400)]
Reorder configure options to be before variables

Reorder the configure options generated by build_nmh so they
will be before the variables, otherwise they end up IN things like
CFLAGS.  Fixes bug #56680.

6 years agoFix handling of fullname
Ken Hornstein [Mon, 15 Jul 2019 18:25:53 +0000 (14:25 -0400)]
Fix handling of fullname

Make it that if a Local-Mailbox profile entry was NOT specified
that the fullname would be generated BEFORE the local mailbox was
generated, so the user's name ended up in the email address properly.

6 years agoshow and mhl now decode more addresses in header fields.
David Levine [Sun, 14 Jul 2019 13:29:21 +0000 (09:29 -0400)]
show and mhl now decode more addresses in header fields.

Added decoding of To:, Cc:, Resent-To:, Resent-Cc:, and
Resent-From: addresses to mhl.format and mhl.headers.  Thanks to
Conrad Hughes for suggesting it for the first two components and
to Ralph for suggesting it for the Resent- components.

6 years agoHandle teen ordinal suffixes correctly.
Ken Hornstein [Mon, 8 Jul 2019 15:37:15 +0000 (11:37 -0400)]
Handle teen ordinal suffixes correctly.

6 years agoCreate new mh-format function %(ordinal)
Ken Hornstein [Mon, 8 Jul 2019 13:59:15 +0000 (09:59 -0400)]
Create new mh-format function %(ordinal)

Implement a new mh-format function %(ordinal).  This will output
the appropriate ordinal prefix (st, nd, rd, st) based on the value
of the "num" register.

6 years agoSupport the TLS SNI extension
Ken Hornstein [Sat, 29 Jun 2019 18:17:16 +0000 (14:17 -0400)]
Support the TLS SNI extension

Add support for sending the TLS Server Name Indicator extension
during TLS connection negotiation.

6 years agoPrint port number in the connection error message
Ken Hornstein [Mon, 24 Jun 2019 16:42:05 +0000 (12:42 -0400)]
Print port number in the connection error message

If a connection to a host fails, print the port number in the brief error
message.  This will hopefully eliminate problems when nmh is using a default
port number that users are not expecting.

6 years ago- Fixed bcc to work with sendmail/pipe [Bug 55700].
Alexander Zangerl [Sun, 9 Jun 2019 15:40:38 +0000 (11:40 -0400)]
- Fixed bcc to work with sendmail/pipe [Bug 55700].

And better documented that dcc doesn't work with sendmail/pipe.

6 years agoCommit ddf3a8574f65 is a fix to commit af586ebe59b7.
David Levine [Sun, 9 Jun 2019 15:02:45 +0000 (11:02 -0400)]
Commit ddf3a8574f65 is a fix to commit af586ebe59b7.

6 years agoFixed inc(1) and %(me) to not obey Local-Mailbox profile component.
David Levine [Sun, 9 Jun 2019 14:58:11 +0000 (10:58 -0400)]
Fixed inc(1) and %(me) to not obey Local-Mailbox profile component.

Thanks to Martin McCormick for reporting and Ken for diagnosing.

6 years agoAdded missing ')'.
David Levine [Sun, 9 Jun 2019 14:57:07 +0000 (10:57 -0400)]
Added missing ')'.

6 years agoClean up more whitespace errors
Ken Hornstein [Sat, 18 May 2019 14:17:15 +0000 (10:17 -0400)]
Clean up more whitespace errors

Get rid of more whitespace errors; hopefully I got them all.

6 years agoRemove the #ifdef UK for the default scan format
Ken Hornstein [Sat, 18 May 2019 13:21:21 +0000 (09:21 -0400)]
Remove the #ifdef UK for the default scan format

Remove the #ifdef UK that lets you select an alternate default
scan format; this is left over from old mhconfig program.

6 years agoFix whitespace errors
Ken Hornstein [Sat, 18 May 2019 03:50:16 +0000 (23:50 -0400)]
Fix whitespace errors

6 years agoRemove final traces of TMA support
Ken Hornstein [Fri, 17 May 2019 18:27:28 +0000 (14:27 -0400)]
Remove final traces of TMA support

TMA (the TTI Trusted Mail Agent) was an early implementation of
encrypted mail and is long gone.  There were a few vestigial bits
of this support left in nmh, and this is finally removing them.
This includes the check for the "Encrypted" header field in various
scan formats and some code to return the code SCNENC from scan()
function where it would have special handling by programs like inc(1).

6 years agoAdded links to David Malone's MH 6.x archives.
David Levine [Wed, 15 May 2019 23:38:43 +0000 (19:38 -0400)]
Added links to David Malone's MH 6.x archives.

6 years agoCleanup MIME header handling in mhbuild
Ken Hornstein [Mon, 13 May 2019 00:07:56 +0000 (20:07 -0400)]
Cleanup MIME header handling in mhbuild

Per discussion on nmh-workers, cleanup the handling of MIME headers
in mhbuild.  The following logic should now apply.

If mhbuild is run with -auto AND a MIME-Version header is detected, then
exit silently with no error (and leave the draft untouched).  Otherwise,
if a MIME-Version header or ANY Content-* header is found, exit with an
error.  Note that this means if mhbuild is run with -auto then an error
will be returned if any Content-* headers are seen.

Previously, mhbuild would silently eat any Content-Type headers seen
in an existing draft; this behavior was brought forward from MH 6 and
no one could explain the reason for this behavior.  This behavior has
been removed.

6 years agoAdded several historical source archives from the early days of MH.
David Levine [Sun, 12 May 2019 15:03:14 +0000 (11:03 -0400)]
Added several historical source archives from the early days of MH.

SRI-NOSC, 2.9BSD, mh-jun-1982, and mh-nov-1983 predate those under
RCS/CVS source code control.

Thanks to M. Levinson, David Malone, Chad, Noel Chiappa, and Ralph
for advising of their discoveries of the various archive locations.

Removed docs/historical/mh-6.8.5/miscellany/mem/a.out because SPARC
executables shouldn't be archived.

6 years agoImprove fmttest output
Ken Hornstein [Sun, 5 May 2019 02:46:45 +0000 (22:46 -0400)]
Improve fmttest output

Improve the fmttest output; make it so more arguments to format
instructions are printed and clean up some of the argument handling.

6 years agoClarify %(profile) escape
Ken Hornstein [Sat, 4 May 2019 23:36:38 +0000 (19:36 -0400)]
Clarify %(profile) escape

Note that %(profile) can also pull entries from the context as well
as the profile

6 years agoRemove support for message/partial
Ken Hornstein [Sat, 4 May 2019 03:50:34 +0000 (23:50 -0400)]
Remove support for message/partial

6 years agoImprove SASL snoop output
Ken Hornstein [Thu, 2 May 2019 17:26:56 +0000 (13:26 -0400)]
Improve SASL snoop output

Generate more information in the netsec layer when -snoop is enabled.
Specifically, enumerate the supported SASL mechanisms by the client and
server and explain which layer is using encryption.

6 years agoPermit the matching of canonical MIME multipart boundaries
Ken Hornstein [Mon, 29 Apr 2019 01:07:24 +0000 (21:07 -0400)]
Permit the matching of canonical MIME multipart boundaries

Allow the matching of MIME multipart boundaries if the message is
in canonical form (\r\n line endings).

6 years agoUpdated name of generated file in comment of generation script.
David Levine [Thu, 25 Apr 2019 00:42:28 +0000 (20:42 -0400)]
Updated name of generated file in comment of generation script.

6 years agoRemoved test that hasn't been added to repo.
David Levine [Wed, 24 Apr 2019 23:22:22 +0000 (19:22 -0400)]
Removed test that hasn't been added to repo.

Fix to commit 3f845b1b0.

6 years agoCommented out full output device test in test-scan.
David Levine [Wed, 24 Apr 2019 23:10:02 +0000 (19:10 -0400)]
Commented out full output device test in test-scan.

Reverts commit d9b33232b.  It would pass on platforms that don't
have /dev/full, but was expected to fail.

6 years agoRemoved redundant initialization of local variable tls.
David Levine [Wed, 24 Apr 2019 22:46:51 +0000 (18:46 -0400)]
Removed redundant initialization of local variable tls.

Fix to commit ec173fd2c.  gcc noticed that it, in effect, it
was declared as an int but initialized the second time with
a bool value.

6 years agoRemove MIME content caching code
Ken Hornstein [Wed, 24 Apr 2019 17:05:30 +0000 (13:05 -0400)]
Remove MIME content caching code

Remove all of the MIME content caching code.  Besides being of dubious
value and having a number of 'interesting' security implications,
it apparently only would cache content if you ran it using mhn
(the necessary entry point was not copied over when mhn was split
apart) and it would only work on the top-level MIME content of a
message.

6 years agoRemoval of Content-MD5 support
Ken Hornstein [Wed, 24 Apr 2019 14:25:18 +0000 (10:25 -0400)]
Removal of Content-MD5 support

The generation and verification of Content-MD5 headers is no longer
done.  FINALLY.

6 years agoFix file descriptor leak in ruserpass()
Ken Hornstein [Tue, 23 Apr 2019 16:40:44 +0000 (12:40 -0400)]
Fix file descriptor leak in ruserpass()

6 years agoMention inc(1)/msgchk(1) changes
Ken Hornstein [Tue, 23 Apr 2019 16:30:36 +0000 (12:30 -0400)]
Mention inc(1)/msgchk(1) changes

6 years agoSet the close-on-exec flag for sockets
Ken Hornstein [Tue, 23 Apr 2019 01:42:14 +0000 (21:42 -0400)]
Set the close-on-exec flag for sockets

Since we no longer use closefds(), start cleaning up stray descriptors.
Start by making sure that any network sockets we create have the
close-on-exec flag set on them.

6 years agoMerge branch 'pop-stls'
Ken Hornstein [Tue, 23 Apr 2019 00:43:47 +0000 (20:43 -0400)]
Merge branch 'pop-stls'

6 years agoLoosen up valgrind suppression
Ken Hornstein [Tue, 23 Apr 2019 00:42:57 +0000 (20:42 -0400)]
Loosen up valgrind suppression

Change the valgrind suppression rules so they exclude more things
on MacOS X.

6 years agoGarbage collect closefds()
Ken Hornstein [Tue, 23 Apr 2019 00:36:14 +0000 (20:36 -0400)]
Garbage collect closefds()

Remove the closefds() function; it was used sporadically and was
causing problems on High Sierra.  In the future look at opening
more descriptors with FD_CLOEXEC.

6 years agoFinal cleanup of POP STLS support
Ken Hornstein [Tue, 23 Apr 2019 00:30:24 +0000 (20:30 -0400)]
Final cleanup of POP STLS support

Perform final cleanup for support for the STLS command in POP.  Add
necessary switches to msgchk and add information to man pages.

6 years agoOutput the header name for the PUTADDR instruction
Ken Hornstein [Mon, 22 Apr 2019 23:51:52 +0000 (19:51 -0400)]
Output the header name for the PUTADDR instruction

6 years agoAdd basic support for the STLS command in POP
Ken Hornstein [Mon, 22 Apr 2019 23:46:17 +0000 (19:46 -0400)]
Add basic support for the STLS command in POP

Add support for the STLS command in POP (sometimes called STARTTLS).
Functionality not yet complete.

7 years agoAdded -checkbase switch to mhfixmsg(1).
David Levine [Sun, 7 Apr 2019 17:17:23 +0000 (13:17 -0400)]
Added -checkbase switch to mhfixmsg(1).

7 years agoRenamed build_multipart_alt() to build_multipart().
David Levine [Sun, 7 Apr 2019 17:14:59 +0000 (13:14 -0400)]
Renamed build_multipart_alt() to build_multipart().

And some other minor code cleanup.

7 years agoAdd support for %(trimr) format function
Ken Hornstein [Fri, 22 Mar 2019 15:59:04 +0000 (11:59 -0400)]
Add support for %(trimr) format function

Add support for a %(trimr) format function, which behaves exactly
like %(trim) but also returns a string.  Turns out this is literally
a one-line change that does not require a new format instruction.

7 years agoReplaced use of hard-coded sizes with sizeof the char arrays.
David Levine [Tue, 13 Nov 2018 21:53:20 +0000 (16:53 -0500)]
Replaced use of hard-coded sizes with sizeof the char arrays.

Fix to commit 23024ffad75d997bf2a85b3a65fbfdfd35f8150c.

7 years agoAdded CONTEXT section to fmttest man page.
David Levine [Sat, 10 Nov 2018 17:38:01 +0000 (12:38 -0500)]
Added CONTEXT section to fmttest man page.

7 years agoAdded -attendee switch to mhical(1).
David Levine [Sat, 10 Nov 2018 17:35:31 +0000 (12:35 -0500)]
Added -attendee switch to mhical(1).

This allows the user to select which of their attendee addresses they are
responding about, when they have more than one in the invitation.
Added corresponding -a switch to calaccept, etc., functions in replaliases.
Updated mhical to retain DESCRIPTION lines.  Gmail puts a link to the event
DESCRIPTION line along with a message to no edit that section, though it
seems to accept responses if the DESCRIPTION line was removed.
Incremented mhical version number to 0.5.

7 years agoReduced quantities of data that could be written to a few buffers.
David Levine [Sat, 3 Nov 2018 19:03:17 +0000 (15:03 -0400)]
Reduced quantities of data that could be written to a few buffers.

gcc 8 noticed that snprintfs could have overrun the buffers.

7 years agoIncreased sizes of a couple of buffers.
David Levine [Thu, 1 Nov 2018 23:44:32 +0000 (19:44 -0400)]
Increased sizes of a couple of buffers.

gcc 8 noticed that snprintf could have overrun them.  It might be
better to reduce the sizes of buffers used for display names, etc.
Or ever better, use dynamically sized buffers.

7 years agoResized buffer, and moved it to the only block where it's used.
David Levine [Wed, 31 Oct 2018 23:09:33 +0000 (19:09 -0400)]
Resized buffer, and moved it to the only block where it's used.

gcc 8 noticed that snprintf could have overrun it.

7 years agoResized buffer and provided timezone its own buffer.
David Levine [Wed, 31 Oct 2018 22:51:23 +0000 (18:51 -0400)]
Resized buffer and provided timezone its own buffer.

gcc 8 noticed that snprintfs could have overrun them.

7 years agoAdded full output test to test-scan.
David Levine [Wed, 31 Oct 2018 02:01:05 +0000 (22:01 -0400)]
Added full output test to test-scan.

From commit f54674f1b5d07148d9655fc3b337ad5f725272a7.  The test
fails now, so added to XFAIL_TESTS.

7 years agoRevert "scan(1) now checks for full output device [Bug #50925]."
David Levine [Tue, 30 Oct 2018 01:54:08 +0000 (21:54 -0400)]
Revert "scan(1) now checks for full output device [Bug #50925]."

This reverts commit f54674f1b5d07148d9655fc3b337ad5f725272a7.

7 years agoscan(1) now checks for full output device [Bug #50925].
David Levine [Sun, 28 Oct 2018 18:27:39 +0000 (14:27 -0400)]
scan(1) now checks for full output device [Bug #50925].

Added fflush(3) after every output line:  may slow down scan on
output with large number of lines.

7 years agoAdded PROFILE COMPONENTS section and corrected CONTEXT.
David Levine [Sun, 28 Oct 2018 14:47:40 +0000 (10:47 -0400)]
Added PROFILE COMPONENTS section and corrected CONTEXT.

7 years agoCorrected comment: whom(1) does not use context_foil().
David Levine [Sun, 28 Oct 2018 14:45:08 +0000 (10:45 -0400)]
Corrected comment: whom(1) does not use context_foil().

7 years agoIncreased sizes of a couple of buffers.
David Levine [Sat, 22 Sep 2018 13:50:44 +0000 (09:50 -0400)]
Increased sizes of a couple of buffers.

gcc 8 noticed that snprintfs could have overrun them.

7 years agoCheck for /etc/centos-release, on CentOS.
David Levine [Sat, 22 Sep 2018 13:12:51 +0000 (09:12 -0400)]
Check for /etc/centos-release, on CentOS.

7 years agoruserpass.c: Return the password typed by the user.
Ralph Corderoy [Sun, 1 Jul 2018 08:49:28 +0000 (09:49 +0100)]
ruserpass.c: Return the password typed by the user.

Darren Provine reported that entering the password didn't work.  This
was due to ruserpass() failing to set the password.  Fixes 1d4977af.

7 years agomhlsbr.c: Use variable for strncpy(3)'s size, not sizeof.
Ralph Corderoy [Sun, 1 Jul 2018 08:43:05 +0000 (09:43 +0100)]
mhlsbr.c: Use variable for strncpy(3)'s size, not sizeof.

Silences gcc 8.1.1's warning that the size of the source was being used,
not the destination.  The destination has just been allocated to be the
size of the source so no overflow can occur.  Move existing variable
that later holds the buffer size to before the allocation and strncpy so
it can be used for those too.

7 years agopost.c: Remove `pure' attribute from void-returning chkadr().
Ralph Corderoy [Sun, 1 Jul 2018 08:36:25 +0000 (09:36 +0100)]
post.c: Remove `pure' attribute from void-returning chkadr().

Spoted by gcc 8.1.1.  Fixes 93a18dd7.

7 years agorcvtty.c: Use struct utmpx's ut_line[], not a copy.
Ralph Corderoy [Sun, 1 Jul 2018 08:32:28 +0000 (09:32 +0100)]
rcvtty.c: Use struct utmpx's ut_line[], not a copy.

Silences gcc 8.1.1's warning that strncpy(3)'s length is the sizeof of
the source, not the destination, by removing the strncpy and passing the
source to alert() where it's only read, not written.

7 years agoman: Use `.B' instead of `.BR' when only one argument.
Ralph Corderoy [Thu, 31 May 2018 12:35:19 +0000 (13:35 +0100)]
man: Use `.B' instead of `.BR' when only one argument.

7 years agoThe sendmail config component/switch can be used with sendmail/smtp mts.
David Levine [Thu, 31 May 2018 01:20:22 +0000 (21:20 -0400)]
The sendmail config component/switch can be used with sendmail/smtp mts.

As well as with sendmail/pipe.

8 years agoChange the default editor from 'vi' to 'prompter'.
Ken Hornstein [Sun, 18 Mar 2018 02:34:14 +0000 (22:34 -0400)]
Change the default editor from 'vi' to 'prompter'.

Absent any profile environment variable setting, the default editor
for commands like 'comp', 'forw', and others is now the nmh program
'prompter'.

8 years agoFixed mhshow/test-charset to work on all tested platforms.
David Levine [Tue, 20 Feb 2018 02:30:17 +0000 (21:30 -0500)]
Fixed mhshow/test-charset to work on all tested platforms.

Restores the functionality of commit f81046da6.  Also, skips the
last two tests if iconv isn't enabled.  And removes the test
files if the last test, without iconv_elides_question_marks, behaves
as expected.  Finally, some comments have been updated.

8 years agoAvoid free() in format engine for now.
Ken Hornstein [Mon, 12 Feb 2018 21:01:08 +0000 (16:01 -0500)]
Avoid free() in format engine for now.

This free() call messes up the buffer handling in scansbr.c:scan();
for now we're going to live with the leak and fix this properly when
we normalize the format engine's memory handling.

8 years agocpstripped(): Replace malloc()s with statics based on MB_LEN_MAX.
Ralph Corderoy [Sun, 11 Feb 2018 13:02:24 +0000 (13:02 +0000)]
cpstripped(): Replace malloc()s with statics based on MB_LEN_MAX.

MB_CUR_MAX from stdlib.h isn't a compile-time constant so can't be used
for the size of a couple of static char arrays so malloc() was used at
run time, with the tiny claims never being freed.  valgrind(1) noticed
and David suggested MB_LEN_MAX from limits.h instead;  that header's
contents are suitable for #if expressions and thus compile-time
constants.

8 years agoRemove extra semicolons at end of C statements.
Ralph Corderoy [Fri, 9 Feb 2018 18:51:59 +0000 (18:51 +0000)]
Remove extra semicolons at end of C statements.

8 years agotrunccpy(): Fix typo in comment describing function.
Ralph Corderoy [Wed, 7 Feb 2018 23:24:11 +0000 (23:24 +0000)]
trunccpy(): Fix typo in comment describing function.

8 years agomhshowsbr.c: Delete single-use global int `nolist'.
Ralph Corderoy [Tue, 23 Jan 2018 18:20:16 +0000 (18:20 +0000)]
mhshowsbr.c: Delete single-use global int `nolist'.

Was only used in one place for its value that was always zero.

8 years agoAdd a few more MacOS X valgrind suppressions
Ken Hornstein [Sat, 10 Feb 2018 06:29:46 +0000 (01:29 -0500)]
Add a few more MacOS X valgrind suppressions

8 years agoClean up memory leaks by callers of scan().
Ken Hornstein [Sat, 10 Feb 2018 04:15:32 +0000 (23:15 -0500)]
Clean up memory leaks by callers of scan().

Make sure we reuse the "scanl" argument to the scan() function, as that's
the signal to have scan() reuse it's buffers.  Otherwise repeated calls
to scan will leak a TON of memory.  Reported by Ralph Corderoy.

8 years agoCompile the header format for each message.
David Levine [Fri, 9 Feb 2018 00:43:56 +0000 (19:43 -0500)]
Compile the header format for each message.

Per Ken's suggestion, compile_header() and compile_marker() are now
called for each message.  That's done with reset_comptable disabled.
So, per Ralph's suggestion, fmt_free(NULL, 1) is called after all
messages are shown to free up memory held by the component table.