Commit graph

1129 commits

Author SHA1 Message Date
Jeremy Sowden f6531a0130 wmix: fixed some typo's.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-27 15:05:06 +01:00
Jeremy Sowden 4bd558d111 wmix: bumped to 3.4.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-27 12:03:53 +01:00
Jeremy Sowden adf8b97d7b wmbiff: bumped to 0.4.35.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-23 22:40:50 +01:00
Jeremy Sowden 804f88f90b wmbiff: updated AUTHORS.
Added Doug Torrance and myself to the list.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-23 22:40:50 +01:00
Jeremy Sowden 0ad05f5d78 wmbiff: added support for TLS SNI.
From Debian bug #917993:

  From: Nye Liu <nyet@nyet.org>
  Subject: wmbiff: gmail (and many other IMAP servers) now require SNI
  Date: Tue, 01 Jan 2019 18:33:51 -0800

  wmbiff/gmail imap4: Need new connection to ***@gmail.com@imap.gmail.com
  wmbiff/gmail comm: certificate passed time check.
  wmbiff/gmail comm: server's certificate (OU=No SNI provided\; please fix your client.,CN=invalid2.invalid) does not match its hostname (imap.gmail.com).
  wmbiff/gmail comm: server's certificate does not match its hostname.
  wmbiff/gmail comm: to ignore this error, run wmbiff with the -skip-certificate-check option

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-23 15:38:49 +01:00
Jeremy Sowden 241ad5eae9 wmbiff: bumped to 0.4.34.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-22 23:08:13 +01:00
Michael Shriver 005d0a491d Updated GetKP script with current NOAA URLs +other bug fixes 2019-07-17 13:39:24 +01:00
Jeremy Sowden 2ec13c2f6f wmbiff: use one for-loop when creating backing XPM.
Fixes static analysis warning about uninitialized value.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-14 17:35:21 +01:00
Jeremy Sowden 70ceed6e38 wmbiff: fixed possible null-pointer dereference.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-14 17:35:21 +01:00
Jeremy Sowden de97a44cb4 wmbiff: fixed leaks.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-14 17:35:21 +01:00
Jeremy Sowden e672c84d1c wmbiff: removed superfluous assignment.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-14 17:35:21 +01:00
Jeremy Sowden ecca3b3b45 wmbiff: replaced strncpy with memcpy.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-14 17:35:21 +01:00
Jeremy Sowden b055b12fa5 wmbiff: stop hiding pointers behind typedefs.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-14 17:35:21 +01:00
Jeremy Sowden dc66a3de45 wmbiff: added .gitignore.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-14 17:35:21 +01:00
Jeremy Sowden b4882f131f wmbiff: removed autoconf directory.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-14 17:35:21 +01:00
Jeremy Sowden a239028734 wmbiff: added autogen.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-14 17:35:21 +01:00
Jeremy Sowden 5b7e5d8924 wmail: call XSetCommand().
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-10 09:43:45 +01:00
Jeremy Sowden e330aaee46 wmix: call XSetCommand().
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-10 09:43:45 +01:00
Jeremy Sowden 4feb6bd3d1 wmix: added autogen and .gitignore.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-10 09:43:45 +01:00
Jeremy Sowden 5c213e9e77 wmbiff: use size_t for password-lengths.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Jeremy Sowden 897886a68c wmbiff: fixed endianness problems parsing server-ports.
`regulo_atoi` expects a pointer-to-int and `PCU.serverPort` is a
`uint16_t`, so `&PCU.serverPort` is not compatible and we need to use an
`int` temporary variable to avoid endianness problems.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Jeremy Sowden d0345f1059 wmbiff: fixed endianness problems connecting to POP and IMAP servers.
`addr.sin_addr.s_addr` is a `uint32_t` in NBO, so assigning a
`struct in_addr` cast to `unsigned long` will break on 64-bit big-endian
architectures.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Jeremy Sowden dfa571a21b wmbiff: addr.sin_port is in NBO, so we should use ntohs(3), not htons(3).
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Jeremy Sowden 5d9eb1eb11 wmbiff: tidy up socket connexions.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Jeremy Sowden 1d9d06f152 wmbiff: correct the address size passed to connect(2).
`addr` is a `struct sockaddr_in`, not a `struct sockaddr`; using `sizeof
var` instead of `sizeof (type)` ensures that the right size is used.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Jeremy Sowden 3c0016eb79 wmbiff: regulo_match modifies instructions[i].destination, so remove const.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Jeremy Sowden 759e9a363a wmbiff: use temporary variables and remove casts.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Jeremy Sowden 0e0dd78437 wmail: updated change-log and bumped to 2.3. 2019-06-21 12:28:08 +01:00
Jeremy Sowden d77e013060 wmail: fixed use-after-free.
The CleanupNames() function removed the sender-addresses for deleted
mails, but did not set the namesChanged flag to true.  This meant that
if the ticker was displaying the address of a mail which had been
deleted it would continue doing so after the address had been freed.
2019-06-21 12:28:08 +01:00
Jeremy Sowden c4eb6d91d2 wmail: handle allocation failures.
Check the return values of some invocations of malloc and strdup and
ensure that any NULL's are handled correctly.
2019-06-21 12:28:08 +01:00
Jeremy Sowden dbc178ec3f wmail: fixed possible NULL-pointer dereference in config-parser.
The code calling Tokenize assumed that if it returned true, value would
not be NULL.  However, in the case of a line containing no equals sign:

  blah

that would not be the case.  Changed Tokenize to return false unless id
and value are both defined.
2019-06-21 12:28:08 +01:00
Jeremy Sowden 40d7eb504c wmail: fixed NULL-pointer dereference if opendir(3) fails.
Code was:

  if (( dir = opendir( ... )))
  {
    // ...
  }
  closedir( dir ); // dir may be NULL

Moved closedir(3) inside if-block.
2019-06-21 12:28:08 +01:00
Jeremy Sowden 2ae0c7cba4 wmail: use continue instead of goto. 2019-06-21 12:28:08 +01:00
Jeremy Sowden 68baa67992 wmail: formatting improvements. 2019-06-21 12:28:08 +01:00
Jeremy Sowden 1b6f872f07 wmail: debug macro fixes. 2019-06-21 12:28:08 +01:00
Jeremy Sowden 98872a4c14 wmail: fixed config typo.
The old spelling is still supported.
2019-06-21 12:28:08 +01:00
Jeremy Sowden 5b50ebaefb libdockapp: removed assertion that short-form options have length 2.
The mixed-option parsing code includes an assertion that short-form
options have a length of two.  However, there is no other validation of
this requirement and some dock-apps do not comply with it, which means
that if one exec's them with an unrecognized option or a mix of short
options, the assertion fails and the app aborts.

For example:

  $ /usr/bin/wmail --help | grep '\<display\>'
    -display <string>            display to use
  $ /usr/bin/wmail --blah
  wmail: daargs.c:126: contains: Assertion `strlen(needle) == 2' failed.
  Aborted

Since there is no explicit statement of this requirement, let's replace
the assertion with a conditional.
2019-06-13 22:35:56 +01:00
Jeremy Sowden 00630c75c7 wmail: updated change-log and bumped to 2.2. 2019-06-12 23:48:04 +01:00
Jeremy Sowden 7c4664d55c wmail: removed superfluous continue. 2019-06-12 23:48:04 +01:00
Jeremy Sowden 1b049207fa wmail: fixed error in build instructions. 2019-06-12 23:48:04 +01:00
Jeremy Sowden 9205d51d68 wmail: removed commented-out variable. 2019-06-12 23:48:04 +01:00
Jeremy Sowden 97a82c5e14 wmail: POSIX doesn't have a "t" mode flag for fopen(3). 2019-06-12 23:48:04 +01:00
Jeremy Sowden 73897dff25 wmail: formatting fixes. 2019-06-12 23:48:04 +01:00
Jeremy Sowden b25ef198e3 wmail: strip leading white-space when doing skip-name comparisons. 2019-06-12 23:48:04 +01:00
Jeremy Sowden 116d47e6e1 wmail: dropped unused enum values. 2019-06-12 23:48:04 +01:00
Jeremy Sowden 0360aff8e8 wmail: use realloc(3) and handle allocation failures. 2019-06-12 23:48:04 +01:00
Jeremy Sowden 0fb61f1e49 wmail: fixed memory leaks in skip-names. 2019-06-12 23:48:04 +01:00
Jeremy Sowden 6e48b4a431 wmail: added command-line option to specify a different config-file. 2019-06-12 23:48:04 +01:00
Jeremy Sowden 7590c32f82 wmail: parse command-line arguments before reading config-file.
Fixes warnings about config and check-sum files when using --help and --version.
2019-06-12 23:48:04 +01:00
Jeremy Sowden 8f7f9881a0 wmail: removed hard-coded string lengths. 2019-06-12 23:48:04 +01:00