]>
diplodocus.org Git - nmh/log
David Levine [Sun, 6 Nov 2016 21:46:42 +0000 (16:46 -0500)]
Free c_ctparams for all content types, not just text.
Ralph Corderoy [Thu, 3 Nov 2016 10:41:50 +0000 (10:41 +0000)]
uip/ap, uip/dp: Remove unneeded char **arguments.
Ralph Corderoy [Wed, 2 Nov 2016 23:25:14 +0000 (23:25 +0000)]
dp: Fix write past end of dates[] array.
Not spotted by valgrind because that doesn't check heap or stack arrays.
Ralph Corderoy [Thu, 3 Nov 2016 10:36:30 +0000 (10:36 +0000)]
ap: Fix write past end of addrs[] array.
Not spotted by valgrind because that doesn't check heap or stack arrays.
David Levine [Sat, 5 Nov 2016 13:49:59 +0000 (09:49 -0400)]
Just show relevant portion of invalid encoded string.
David Levine [Sat, 5 Nov 2016 13:46:17 +0000 (09:46 -0400)]
Replaced use of freects_done() with free_content() for each message.
Thereby not holding on to open file descriptors until termination.
David Levine [Thu, 3 Nov 2016 19:50:40 +0000 (15:50 -0400)]
Pass through message even if from relative folder.
David Levine [Thu, 3 Nov 2016 12:52:53 +0000 (08:52 -0400)]
Use result, because (void) didn't prevent warning on FreeBSD 10.
Ralph Corderoy [Thu, 3 Nov 2016 11:14:55 +0000 (11:14 +0000)]
test-rfc6532: Export LC_CTYPE after setting it.
Updates commit
2c4ac164edefd18861595ec7624e5ad344b10198 .
David Levine [Thu, 3 Nov 2016 00:33:52 +0000 (20:33 -0400)]
Changed type of flags from signed to unsigned long.
David Levine [Thu, 3 Nov 2016 00:24:32 +0000 (20:24 -0400)]
Replace non-ASCII characters in headers with ?'s with non-UTF8 locale.
David Levine [Thu, 3 Nov 2016 00:08:27 +0000 (20:08 -0400)]
Fixed display of header field values with multibyte characters.
David Levine [Wed, 2 Nov 2016 15:36:07 +0000 (11:36 -0400)]
Removed NMH_UNUSED(hostname) because it no longer exists.
Ken Hornstein [Wed, 2 Nov 2016 14:45:16 +0000 (10:45 -0400)]
Add some Autoconf support for older OpenSSL libraries that don't support
hostname verification.
Ralph Corderoy [Wed, 2 Nov 2016 12:08:04 +0000 (12:08 +0000)]
State netsec_set_tls()'s noverify is unused if no TLS.
Stops compiler warning.
Ken Hornstein [Wed, 2 Nov 2016 03:30:34 +0000 (23:30 -0400)]
Update docs a bit.
Ken Hornstein [Wed, 2 Nov 2016 03:13:04 +0000 (23:13 -0400)]
Add support for certificate verification when using TLS.
Ken Hornstein [Mon, 31 Oct 2016 01:20:36 +0000 (21:20 -0400)]
Print out more TLS information if -snoop is turned on.
Ralph Corderoy [Tue, 1 Nov 2016 17:49:08 +0000 (17:49 +0000)]
test/folder: Add test-coverage; lots of check_exit.
Ralph Corderoy [Tue, 1 Nov 2016 17:03:14 +0000 (17:03 +0000)]
Split one-line condition+body to get gcov results.
Ralph Corderoy [Tue, 1 Nov 2016 12:37:48 +0000 (12:37 +0000)]
uip/dist.c: Increase coverage.
Ralph Corderoy [Tue, 1 Nov 2016 12:23:12 +0000 (12:23 +0000)]
uip/send: -saslmech lacking argument indexed outside array.
Similar to problem in commit
171ad462ce7582196f91f93f91f99fc60a21189e .
Ralph Corderoy [Tue, 1 Nov 2016 11:51:26 +0000 (11:51 +0000)]
man: Fix spelling mistakes.
Ralph Corderoy [Tue, 1 Nov 2016 11:49:43 +0000 (11:49 +0000)]
Fix spelling mistake in comment.
Only done because the same typo appears in the man pages.
Ralph Corderoy [Tue, 1 Nov 2016 11:49:11 +0000 (11:49 +0000)]
Fix spelling mistakes in UI text.
Ralph Corderoy [Tue, 1 Nov 2016 11:11:11 +0000 (11:11 +0000)]
test: Remove the " # gcov" comment from check_exit calls.
Now the command is passed to check_exit, that is sufficient to indicate
it's for coverage uses only, and a candidate to be fleshed out into a
test that checks the output.
Ralph Corderoy [Tue, 1 Nov 2016 00:41:58 +0000 (00:41 +0000)]
uip/comp.c: Increase coverage.
Ralph Corderoy [Tue, 1 Nov 2016 00:17:47 +0000 (00:17 +0000)]
uip/burst.c: Increase coverage.
Ralph Corderoy [Tue, 1 Nov 2016 00:08:02 +0000 (00:08 +0000)]
uip/anno.c: Increase coverage.
Ralph Corderoy [Tue, 1 Nov 2016 00:05:42 +0000 (00:05 +0000)]
anno: Stop segmentation violation on `-number 0'.
If atoi(3) returned zero, either because `0' was given or the number
could not be parsed, then the error message dereferenced an invalid
pointer. Found when trying to increase coverage with check_exit.
Ralph Corderoy [Mon, 31 Oct 2016 23:13:02 +0000 (23:13 +0000)]
uip/ali.c: Increase coverage.
Ralph Corderoy [Mon, 31 Oct 2016 18:36:19 +0000 (18:36 +0000)]
ali: Fix a memory leak spotted by valgrind.
Ralph Corderoy [Mon, 31 Oct 2016 18:18:07 +0000 (18:18 +0000)]
mhbuild's fgetstr(): simplify source, logic untouched.
The tests aren't getting 100% coverage and the nested assignments make
it harder to see what's happening, and what needs to happen to gain
coverage. Hoist invariants so it's clear they're such to the reader and
not just the compiler.
David Levine [Mon, 31 Oct 2016 23:01:36 +0000 (19:01 -0400)]
Remove test files that aren't removed by check().
David Levine [Mon, 31 Oct 2016 19:17:55 +0000 (15:17 -0400)]
Replaced BUFSIZ with NMH_BUFSIZ in a few places.
This allows the test suite to succeed with BUFSIZ of 256. We should
consider using different constants for different purposes.
David Levine [Mon, 31 Oct 2016 19:03:07 +0000 (15:03 -0400)]
Don't set CT type if reformat failed.
Ralph Corderoy [Mon, 31 Oct 2016 17:56:13 +0000 (17:56 +0000)]
Uncapitalise a few more mentions of commands in man pages.
Ralph Corderoy [Mon, 31 Oct 2016 17:47:22 +0000 (17:47 +0000)]
mh-mkstemp.man: Detail exit status as 255 rather than -1.
Since that's what the outside kernel and outside world sees.
Ralph Corderoy [Mon, 31 Oct 2016 17:44:24 +0000 (17:44 +0000)]
Use new check_exit in `# gcov' tests.
It showed up fmtdump wasn't being found because $? was 127, not 1.
And mkstemp exits 255 on error, unusually amongst MH commands.
Ralph Corderoy [Mon, 31 Oct 2016 17:18:11 +0000 (17:18 +0000)]
test/common.sh.in: Add test_exit() for $? checking.
The stdout and stderr of the command being tested are saved but ignored,
only regurgitated if the test fails. The test is stated as a fragment
of a test(1) condition, e.g. '-eq 1'. This is mainly intended for the
quick one-liners to increase gcov coverage and thus valgrind's scope.
Over time, better tests that check more of the command's behaviour can
replace these, keeping the coverage level.
David Levine [Mon, 31 Oct 2016 15:39:11 +0000 (11:39 -0400)]
Replaced use of ! with || true, for ultimate Bourne shell compatiblity.
Update to commit
c3ba36f92bcbf44e071961f3d0bb5e6ddab317d6 .
Ralph Corderoy [Sun, 30 Oct 2016 21:45:22 +0000 (21:45 +0000)]
test-nocreate: Don't use run_test and run_prog together.
valgrind tries to run run_prog and can't find the command.
Ralph Corderoy [Sun, 30 Oct 2016 21:06:06 +0000 (21:06 +0000)]
fgets() reserves space for the NUL itself.
No need to knock one off the buffer size when calling it as that
suggests something special is going on.
Ralph Corderoy [Sun, 30 Oct 2016 20:51:07 +0000 (20:51 +0000)]
Gain coverage with `mhparam localmbox'.
Now 100% for uip/mhparam.c
Ralph Corderoy [Sun, 30 Oct 2016 20:48:25 +0000 (20:48 +0000)]
Remove mhparam's p_find()'s ability to take NULL argument.
It can't be passed NULL and couldn't get coverage.
Ralph Corderoy [Sun, 30 Oct 2016 20:41:29 +0000 (20:41 +0000)]
Get coverage of quite a few of the `ambiguous switch' case.
Typically by adding a `foo -', discarding stdout and stderr, and
expecting it to exit non-zero. A `# gcov' comment states its purpose,
and makes it easier to see if they can be deleted in time as other
coverage tests improve.
Ralph Corderoy [Sun, 30 Oct 2016 20:18:28 +0000 (20:18 +0000)]
Split gcov target into multiple sub-targets.
Allows them to be run individually.
Ralph Corderoy [Sun, 30 Oct 2016 15:55:30 +0000 (15:55 +0000)]
Clarify trunccpy()'s src and dest must not overlap.
Ralph Corderoy [Sun, 30 Oct 2016 15:25:44 +0000 (15:25 +0000)]
Replace printf("%s", foo) with fputs(foo, stdout).
Ralph Corderoy [Sun, 30 Oct 2016 15:09:55 +0000 (15:09 +0000)]
Replace strlen(foo) > 0 with *foo.
Ralph Corderoy [Sun, 30 Oct 2016 15:07:41 +0000 (15:07 +0000)]
Add outputs from Makefile.am's gcov target.
*.gcda, *.gcno, and *.gcov.
Ralph Corderoy [Sun, 30 Oct 2016 15:04:38 +0000 (15:04 +0000)]
Remove sbr/peekc.c containing unused peekc().
gcov showed it wasn't getting any; we've all been there.
It didn't check for EOF, nor that the ungetc(3) succeeded.
Ralph Corderoy [Sun, 30 Oct 2016 14:46:01 +0000 (14:46 +0000)]
Replace fprintf(fp, "%s", foo) with fputs(foo, fp).
Ralph Corderoy [Sun, 30 Oct 2016 14:44:07 +0000 (14:44 +0000)]
Replace printf("%s", foo) with fputs(foo, stdout).
Ralph Corderoy [Sun, 30 Oct 2016 14:05:16 +0000 (14:05 +0000)]
Replace printf("%s\n", foo) with puts(foo).
Ralph Corderoy [Sun, 30 Oct 2016 13:45:40 +0000 (13:45 +0000)]
Add trunccpy(), and the convenience TRUNCCPY().
truncpy copies at most size - 1 chars from non-NULL src to non-NULL
dst, and ensures dst is NUL terminated. If size is zero then it
aborts as dst cannot be NUL terminated.
It's to be used when truncation is intended and correct, e.g.
reporting a possibly very long external string back to the user. One
of its advantages over strncpy(3) is it doesn't pad in the common
case of no truncation.
Ralph Corderoy [Sat, 29 Oct 2016 23:03:34 +0000 (00:03 +0100)]
Fix test-header-parsing test script.
It was using sh's backticks that chomped the last linefeed!
Add comment referencing the commit that fixed the code this is testing.
Have fewer test cases, sticking to just one or two character headers
with empty or one-character bodies. Avoids slowing the tests too much
and the fixed bug was to do with hashing one-character headers.
Ralph Corderoy [Sat, 29 Oct 2016 22:11:52 +0000 (23:11 +0100)]
Simplify folder_exists() to just testing stat(2)'s return value.
Ralph Corderoy [Fri, 28 Oct 2016 22:51:41 +0000 (23:51 +0100)]
Replace printf("...\n") with puts("...").
Ralph Corderoy [Fri, 28 Oct 2016 22:10:55 +0000 (23:10 +0100)]
Replace v?fprintf(stdout, ...) with v?printf(...).
David Levine [Sun, 30 Oct 2016 02:24:25 +0000 (22:24 -0400)]
Added (y|n) domain to a couple of build_nmh config prompts.
David Levine [Sun, 30 Oct 2016 02:12:37 +0000 (22:12 -0400)]
Set first character of name[] buffer in BODY state.
Fix to
47313b9bc395470311e383b57eb184c830662c4a to prevent
uninitialized read, revealed by test/burst/test-burst-mime
with NMH_VALGRIND=1.
David Levine [Wed, 26 Oct 2016 23:08:53 +0000 (19:08 -0400)]
Removed configure options now that it determines them automatically.
David Levine [Wed, 26 Oct 2016 15:38:45 +0000 (11:38 -0400)]
Moved build_nmh to top level directory.
David Levine [Wed, 26 Oct 2016 15:31:49 +0000 (11:31 -0400)]
Reworked output handling.
David Levine [Tue, 25 Oct 2016 16:10:51 +0000 (12:10 -0400)]
Reworked default SASL support to enable if header and lib are found.
David Levine [Tue, 25 Oct 2016 15:35:20 +0000 (11:35 -0400)]
Added -r to gcov invocation.
David Levine [Tue, 25 Oct 2016 15:10:01 +0000 (11:10 -0400)]
Add -O0 instead of -O2 to CFLAGS with build_nmh -d option.
David Levine [Tue, 25 Oct 2016 15:05:54 +0000 (11:05 -0400)]
Don't add -D_FORTIFY_SOURCE to AM_CPPFLAGS with -O0.
Ralph Corderoy [Mon, 24 Oct 2016 23:23:49 +0000 (00:23 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/nmh
Ralph Corderoy [Mon, 24 Oct 2016 23:04:12 +0000 (00:04 +0100)]
Replace fputc() with putchar().
David Levine [Mon, 24 Oct 2016 23:01:14 +0000 (19:01 -0400)]
Changed build_nmh sasl and tls defaults to be configure's.
Ralph Corderoy [Mon, 24 Oct 2016 22:49:11 +0000 (23:49 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/nmh
Ralph Corderoy [Mon, 24 Oct 2016 22:37:50 +0000 (23:37 +0100)]
Replace putc() with putchar().
Ralph Corderoy [Mon, 24 Oct 2016 22:37:34 +0000 (23:37 +0100)]
Replace putc() with putchar().
Ralph Corderoy [Mon, 24 Oct 2016 22:36:52 +0000 (23:36 +0100)]
Replace putc() with putchar().
Others already existed. Not being a macro probably won't hurt.
David Levine [Mon, 24 Oct 2016 22:31:27 +0000 (18:31 -0400)]
Removed unnecessary definition of tls_support.
Ralph Corderoy [Mon, 24 Oct 2016 22:22:06 +0000 (23:22 +0100)]
Replace puts() with putchar().
Ralph Corderoy [Mon, 24 Oct 2016 22:21:57 +0000 (23:21 +0100)]
Replace puts() with putchar().
David Levine [Mon, 24 Oct 2016 22:07:48 +0000 (18:07 -0400)]
Reworked default TLS support to enable if header and libs are found.
Also, fixed AC_CHECK_LIB for libssl. The crypto lib
needs to be the fifth, not fourth, argument.
David Levine [Mon, 24 Oct 2016 18:33:23 +0000 (14:33 -0400)]
Removed OAUTH support detection from because configure does it.
Ralph Corderoy [Mon, 24 Oct 2016 18:11:07 +0000 (19:11 +0100)]
sbr/netsec.c: Add NMH_UNUSED(nsc) twice for if !TLS_SUPPORT.
Ralph Corderoy [Mon, 24 Oct 2016 17:59:30 +0000 (18:59 +0100)]
netsec_set_tls(): Return a value in the !TLS_SUPPORT && !tls case.
Silences clang.
David Levine [Mon, 24 Oct 2016 16:58:04 +0000 (12:58 -0400)]
More enhancements to build_nmh.
1) Display failure messages that were hidden.
2) Display location of log file at end, if not in current directory,
the build failed, or verbose was enabled.
3) Replaced use of showbuildenv with less invasive platform info.
4) Don't colorize tests summary if TERM is unset or dumb.
Ralph Corderoy [Mon, 24 Oct 2016 15:34:17 +0000 (16:34 +0100)]
nmh.h: Add getline() prototype, conditional on HAVE_GETLINE.
Ralph Corderoy [Mon, 24 Oct 2016 11:12:29 +0000 (12:12 +0100)]
Fix flex 2.6.1's output regarding signed/unsigned comparisons.
Add comment referencing flex bug.
Note this workaround breaks $(LFLAGS).
Ralph Corderoy [Mon, 24 Oct 2016 11:12:09 +0000 (12:12 +0100)]
mhical.c: display(): Replace memcpy() with struct assignment.
Ralph Corderoy [Sun, 23 Oct 2016 23:18:18 +0000 (00:18 +0100)]
fix_filename_param(): Remove redundant strlen().
Ralph Corderoy [Sun, 23 Oct 2016 23:15:33 +0000 (00:15 +0100)]
fix_filename_param(): Replace strncmp() with HasSuffix().
Ralph Corderoy [Sun, 23 Oct 2016 23:11:42 +0000 (00:11 +0100)]
sbr/utils.c: Add HasSuffix(s, suffix).
HasSuffix returns true if non-NULL s ends with non-NULL suffix.
Ralph Corderoy [Sun, 23 Oct 2016 23:03:48 +0000 (00:03 +0100)]
Use LEN() to save having to consider the -1.
Ralph Corderoy [Sun, 23 Oct 2016 23:03:12 +0000 (00:03 +0100)]
Use LEN() to save having to consider the -1.
Ralph Corderoy [Sun, 23 Oct 2016 23:02:33 +0000 (00:02 +0100)]
Use LEN() to save having to consider the -1.
Ralph Corderoy [Sun, 23 Oct 2016 23:01:54 +0000 (00:01 +0100)]
Remove unused NCWD and NPWD #defines.
Ralph Corderoy [Sun, 23 Oct 2016 22:45:34 +0000 (23:45 +0100)]
Use HasPrefix() instead of strncmp().
Ralph Corderoy [Sun, 23 Oct 2016 22:44:58 +0000 (23:44 +0100)]
Use HasPrefix() instead of strncmp().
Ralph Corderoy [Sun, 23 Oct 2016 22:44:38 +0000 (23:44 +0100)]
Use HasPrefix() instead of strncmp().
Ralph Corderoy [Sun, 23 Oct 2016 22:43:41 +0000 (23:43 +0100)]
Use HasPrefix() instead of strncmp().
Ralph Corderoy [Sun, 23 Oct 2016 22:43:19 +0000 (23:43 +0100)]
Use HasPrefix() instead of strncmp().
Ralph Corderoy [Sun, 23 Oct 2016 22:20:58 +0000 (23:20 +0100)]
Use HasPrefix() instead of strncmp().