Open
Conversation
Use the default certificate store location -- this seems to vary by system. Can be set at runtime with environment variables for non-default locations.
…es starting with "#". Previous functionality discarded data following one of "!#;%". This causes problems when parsing imap_password where the password value may contain one of these characters. The mairixrc(5) manual page indicates comment lines begin with "#". Update mairixrc.5 to clarify trailing comments are not allowed.
Address compiler warning regarding possible uninitialized used of got_uid_len and raw_len. Initialize both to 0.
vandry
requested changes
Jul 3, 2017
Owner
vandry
left a comment
There was a problem hiding this comment.
Thanks. Please see suggestions.
| for (p=line; *p && !strchr("#!;%", *p); p++) ; | ||
| if (*p) *p = '\0'; | ||
| /* Discard comment lines. */ | ||
| if (strchr("#", line[0])) { |
Owner
There was a problem hiding this comment.
This seems like it might be a bit strict. How about allowing whitespace before the # that introduces a comment. Maybe not. I can be convinced otherwise.
Also, this usage of strchr looks very odd to me. Although it is correct, I had to read it again to determine that.
| exit 1 | ||
| fi | ||
| ;; | ||
| *) |
Owner
There was a problem hiding this comment.
This cannot just handle Linux and FreeBSD and bail on everything else.
I suggest testing stat itself, not uname, to determine what stat is available. Something like
if stat --version | grep 'GNU coreutils' >/dev/null; then
# use the GNU syntax
elif
...
fi
| SSL_library_init(); | ||
| sslctx = SSL_CTX_new(SSLv23_client_method()); | ||
| sslctx = SSL_CTX_new(TLSv1_client_method()); | ||
| SSL_CTX_set_options(sslctx, SSL_OP_NO_SSL_MASK); |
Owner
There was a problem hiding this comment.
nit: use tabs, like on the other lines.
vandry
pushed a commit
that referenced
this pull request
Jan 1, 2022
This now outputs usage information if there is more than one argument, or if the first argument starts with a "-". This also returns non-exit-0, so that if we add command line arguments in the future, and somehow someone gets rolled back to an old version of the binary, then the program will exit unsuccessfully, which hopefully will make it clearer what happened (esp if someone has some kind of integration test). This continues to improve the situation in issue #2, but I don't think it really resolves it yet. I've not yet come to a conclusion about what I want to do with command line arguments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes include additional headers to build on FreeBSD 11, use the default location for SSL certificates when verifying an IMAP server certificate, and how comments in mairixrc are handled.
This last change makes the program compatible with the manual page and allows for using special characters in passwords -- the previous behavior would strip passwords from a special character to the end of the line. I've added text to the mairixrc manual page to clarify that trailing comments are not allowed.
SSL certificates are now loaded from the system default location, or a location specified by the user's environment.
Also included is some preliminary work to allow the tests to run on FreeBSD; there is more to do, here, due to differences in BSD versus GNU utilities options.