On Mon, Mar 07, 2016 at 07:34:55PM -0600, Derek Martin wrote: > On Mon, Mar 07, 2016 at 04:30:29PM +0000, Richard Russon wrote: > > Some are from Karel Zak's Notmuch repository; the others are mine.
The four patches you're concerned about are from mutt-kz. I split them out of that repo in order to rebase the notmuch feature onto mutt-1.5.24 and the latest sidebar. I've included the commit messages, if that helps. > > * Use unlocked libc IO everywhere. > > How do you ensure data integrity of, say, an mbox mailstore if you're > not locking? Don't know. https://github.com/neomutt/neomutt/commit/5adde051f0ae67bfc8aeea0a26060c4e6b0685e4 Author: David Wilson <[email protected]> Date: 1 year, 11 months ago Use unlocked libc IO everywhere. Since mutt does not use threads, there is no reason it should use the locked variants of the FILE* IO functions. This checks if the unlocked functions are available, and if so enables them globally via mutt.h. Cuts load time for a 56k message, 1.8GB /var/mail mailbox from 14 seconds to ~6 seconds, since we avoid acquiring and releasing a mutex for every character of input read. Before: 0m14.376s 74.98% mutt libc-2.18.so [.] _IO_getc 11.87% mutt mutt [.] mbox_parse_mailbox 0.94% mutt [kernel.kallsyms] [k] copy_user_generic_string 0.83% mutt libc-2.18.so [.] __strchr_sse2 0.53% mutt libc-2.18.so [.] __memcpy_sse2 0.44% mutt libc-2.18.so [.] _int_malloc After: 6 seconds 68.92% mutt mutt [.] mbox_parse_mailbox 2.25% mutt [kernel.kallsyms] [k] copy_user_generic_string 1.73% mutt libc-2.18.so [.] __strchr_sse2 1.24% mutt libc-2.18.so [.] __memcpy_sse2 1.17% mutt libc-2.18.so [.] _int_malloc 0.87% mutt libc-2.18.so [.] __strspn_sse42 > > * Remove TLS version notification > > Is this a violation of the license? I don't think so (but IANAL). It might be considered a security risk if the version info is hidden. set sleep_time = 0 This effectively hides the message, but also hides messages you may want to see. https://github.com/neomutt/neomutt/commit/d53c0bb24d98635f3264fc1a99d38ec10c071584 Author: Mantas Mikulėnas <[email protected]> Date: 6 months ago Remove TLS version notification The reason for this patch is that the "TLS connection" message adds an unnecessary, annoying, unskippable delay to _every_ mutt startup. (Almost as if its intention was to _discourage_ TLS usage...) diff --git a/mutt_ssl.c b/mutt_ssl.c index e1721a9..b5e2cd4 100644 --- a/mutt_ssl.c +++ b/mutt_ssl.c @@ -444,10 +444,6 @@ static int ssl_negotiate (CONNECTION *conn, sslsockdata* ssldata) if (!ssl_check_certificate (conn, ssldata)) return -1; - mutt_message (_("%s connection using %s (%s)"), - SSL_get_version(ssldata->ssl), SSL_get_cipher_version (ssldata->ssl), SSL_get_cipher_name (ssldata->ssl)); - mutt_sleep (0); - return 0; } > > * Bye srandom() and random() > > Why? Does Mutt use them in a way that is particularly sensitive to > very long repeating sequences? What do you do instead? https://github.com/neomutt/neomutt/commit/c748eb8bd73d96f630815ff6bf36431b0d091941 Author: Sami Farin <[email protected]> Date: 4 months ago Bye srandom() and random() Prefer getrandom on Linux, use /dev/urandom otherwise to get entropy for MIME boundaries, message-id, Maildir filename, temporary filename. Using MUTT_RANDTAG_LEN (currently 16) base32 characters for boundaries and message-id. > > * add strndup.c strnlen.c > Why? https://github.com/neomutt/neomutt/commit/6fa23faa08b19e1748ca20505abddfb47293a906 OK, the patch doesn't change Mutt. Notmuch uses strndup and the patch is a build workaround for systems that don't support it. > The standard "n" functions are almost always misused > [ ... examples of dangerous code ... ] I agree. strndup is used in 5 places. If notmuch every comes close to being integrated to mutt, they could be removed. -- Rich Russon (FlatCap) <[email protected]>
