summaryrefslogtreecommitdiffstats
path: root/mutt_sasl.c
AgeCommit message (Collapse)Author
2021-07-17Fix mutt_sasl buffer size to hold ip_port strings.Kevin McCarthy
The output buffer wasn't quite big enough to hold the maximum size input buffer.
2019-01-04Clean up formatting.Kevin McCarthy
Add spaces after if, else, while, for, switch. Unify the brace placement style. The vast majority of the code uses Allman style so convert the relatively few K&R braces over.
2019-01-04Clean up code indentation.Kevin McCarthy
These are mostly automated changes corresponding to the emacs settings: (c-set-style "linux") (setq c-basic-offset 2) (c-set-offset 'case-label '+) Most of the code follows the convention: (add-to-list 'c-cleanup-list 'space-before-funcall) but this is not enforced by this indentation cleanup. Also, I personally dislike tabs, so I have: (setq-default indent-tabs-mode nil) in my own configuration. However I have no desire to change every line just for that effect. So this cleanup does nothing about the mix issue. Some of the secondary files (e.g. regex.c) have been skipped. I've also skipped crypt-gpgme.c, because I need to think about that file. Werner Koch and the GnuPG team contributed most it, and it follows the Gnu indentation settings. It should probably be made uniform with Mutt, but I don't want to discourage future GnuPG contribution to the file. I manually reverted a few unsightly cleanups, and added a few tweeks when I saw things that could be improved.
2018-12-31Remove trailing whitespace.Kevin McCarthy
The result of find . -name "*.[ch]" -exec emacs -batch {} \ --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
2018-10-23Fix memleaks of saslconn on error pathsPeter Wu
If mutt_sasl_client_new returns an error, the callers would ignore the allocated saslconn resource from sasl_client_new. Be sure to release these with sasl_dispose as documented in sasl.h. Likewise, let callers (POP/IMAP) dispose the resource on their error paths. SMTP was already taken care of. Found with LeakSanitizer in IMAP.
2017-07-22Add timeout parameter to mutt_socket_poll.Kevin McCarthy
This will be used in the next commit to add a timeout when polling for new mail.
2016-07-16Fix memory leak in mutt_sasl_cb_pass.Will Fiveash
SASL doesn't free the sasl_secret_t, so this was leaking. Instead, keep our own pointer to it, and safe_realloc() each time. sasl_secret_t doesn't need the data field null terminated, so memcpy the password over.
2016-05-09Back out wrapper sys_socket.h workaround (23334e967dd7)Kevin McCarthy
After renaming all internal macros from M_* to MUTT_*, the sys_socket.h workaround is no longer necessary.
2016-05-09Change M_* symbols to MUTT_*Derek Martin
Changeset 23334e967dd7 created a workaround for a namespace conflict with Solaris and derivatives. After some discussion, the team decided it would be best to move away from using the "M_" prefix for macros. This patch was automatically generated by running: perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print` with the exception that sys_socket.h was exempted. (That file will be backed out subsequent to this commit.) Thanks to Andras Salamon for supplying the perl script used to make this change.
2016-04-27Create a wrapper sys_socket.h to work around Solaris namespace issues. ↵Kevin McCarthy
(closes #3833) Solaris includes "sys/stream.h" inside their "sys/socket.h". This include file adds many non-reserved macros to Mutt's namespace, two of which conflict with existing Mutt macros. The simplest fix would be to rename those macros in Mutt, however this will cause difficulty with out-of-tree patches. This fix creates a wrapper include file that preserves those existing macros and prevents the Solaris values from entering Mutt's namespace.
2016-01-01Convert copyright years to all use 4 digit years.Kevin McCarthy
Vincent Lefèvre pointed out the common shortcut, e.g 1996-9, is actually not allowed for copyright years. Convert all the copyright years (for mutt files) to use 4 digits.
2016-01-01Update copyright notices.Kevin McCarthy
This patch only updates existing copyright notices in the source files, using commit dates since the last copyright update in commits e3af935cdb1a and f8fd60d8d3f2. Add a notice to the COPYRIGHT file to refer to our mercurial repository for the full commit history. Add myself to the COPYRIGHT file and smime_keys.pl file.
2015-01-29Clean up sasl warnings.Kevin McCarthy
These were caused by assigning callback functions to the sasl_callback_t.proc member. The callback type doesn't list any parameters, because parameters vary by callback. The fix was simply assigning a cast. Cyrus-sasl2 has a sasl_callback_ft typedef that their sample code uses for this purpose, but it is in a different header, saslplug.h, and isn't in their 1.5 tree. Since this is probably not portable to other implementations, I just added an equivalent cast.
2014-09-07mutt_sasl: fix double negative in iptostring result check (fixes #3705)Brendan Cully
2014-09-07mutt_sasl: whitespace onlyBrendan Cully
2012-04-29give user time to read SASL init error messageBrendan Cully
2009-07-01Make getuser/pass abort if input is required in batch mode.Rocco Rutte
Replaces [0a3de4d9a009]. See #3289.
2009-03-19Restore connection polling callback when closing SASL connection. Closes #3206.Roman Kraevskiy
2008-08-26Properly set the SASL external auth name when using SSL client certs.Brendan Cully
Also zero out the account structure before filling it with available data. Client certificates + SASL EXTERNAL were only working by luck.
2008-08-15Fix type-punning warning in sasl_getprop usageBrendan Cully
2008-06-28Basic support for $ssl_client_cert when compiled with gnutls.Brendan Cully
The key must not be encrypted. Closes #2911.
2008-05-07Make SASL support conn_poll method. Make SASL IP lookup failureBrendan Cully
non-fatal. Both are for tunnel support.
2007-02-25Update copyrights.Brendan Cully
2007-02-24This patch adds ESMTP relay support to mutt.Brendan Cully
To use, set $smtp_url to the address of your smtp relay, in the form: smtp[s]://[user[:password]@]host[:port]/ where port defaults to 25 for smtp and 465 for smtps. You can also set $smtp_authenticators to control which methods mutt will attempt to use during authentication. See $imap_authenticators for details.
2006-09-08Don't send protocol garbage to sasl_decode64 during POP authentication.Brendan Cully
Also enable SASL plaintext: $foo_authenticators is a more general solution.
2005-09-17Gah, forgot the zip code when updating the FSF address...Brendan Cully
2005-09-17Update FSF address (via sed, I hope nothing got mangled). Closes: #2071.Brendan Cully
2005-09-06Release global SASL state when quitting.Brendan Cully
2005-09-01Remove obsolete Cyrus SASL 1.5 support.Brendan Cully
2005-08-14Fix some S/MIME spelling inconsistencies.Bernd Ahlers
2005-08-11Silence some compiler warnings.Brendan Cully
2005-08-02Put moribund NSS support out to pasture.Brendan Cully
2005-06-28Add $imap_login variable to specify which user to authenticate asBrendan Cully
($imap_user controls which user's mail gets accessed). Currently this can't be specified interactively, since I can't think of a way to do it that wouldn't annoy users where login == user (the default value of $imap_login).
2005-03-05Rename open/close/read/write function pointers to avoid problems with systemsBrendan Cully
where standard open/close/read/write functions are implemented with macros. Thanks to Aaron Crane and others for their input about the problem.
2005-02-03Add config.h to the top of every C file that could possibly want it.Brendan Cully
Remove it from mutt.h
2005-01-27GNUTLS support. Used in Debian since Nov. 2001.Marco d'Itri
2005-01-27With SASL, expect the server to prompt for additional auth data ifBill Nottingham
we have some to send (#129961, upstream #1845)
2004-08-30Here's a patch to allow mutt to use SSL client certificates toBrendan Cully
authenticate itself. To use, set ssl_client_cert to the path to your certificate file (containing both the certificate and the private key). It works with the SASL EXTERNAL authentication mechanism, so you'll need to have SASL enabled as well.
2004-04-12SASL2 needs errno.h.Paul WALKER
2004-01-05Back out part of the previous SASL/IPv6 patch due to portabilityRobert Schiele
issues.
2003-12-29A while ago I posted a similar patch which is necessary as when muttPatrick Welche
tries to connect to an imap server over ipv6 it stores the address in a sockaddr which may not be large enough to hold the ipv6 address.
2003-09-11This trivial patch closes #1516 (NI_WITHSCOPEID undefined). ThanksBrendan Cully
to Mads for the initial patch.
2003-03-07The global callbacks set up in sasl_client_init are not copied byBrendan Cully
the SASL library, so they can't be allocated on the stack. This is the case with both versions of the SASL library, and I frankly don't understand why it hasn't caused problems before. Since it segfaults reliably on OS X for me now, I thought a patch would be in order.
2002-11-12Hi - this is a patch against mutt-1.4 to use version 2 of the CyrusNathan Dushman
SASL library; all changes are ifdef'd so as not to break SASLv1 support. This includes a patch to configure.in to allow the choice between v1 and v2, but someone with a better understanding of autoconf should double-check it.
2002-02-26Brendan Cully sent a patch.Thomas Roessler
2001-06-13An updated version of the previous patch. From Brendan.Thomas Roessler
2001-05-30Socket API clean-up from Brendan Cully.Thomas Roessler
2001-02-15Brendan Cully's latest STARTTLS patch.Thomas Roessler
2001-02-14STARTTLS patch from Brendan Cully.Thomas Roessler
2001-02-12Brendan Cully's SASL patch.Thomas Roessler