]> diplodocus.org Git - nmh/commitdiff
Always default the username to the local username, even when not
authorKen Hornstein <kenh@pobox.com>
Wed, 11 Jun 2014 01:08:02 +0000 (21:08 -0400)
committerKen Hornstein <kenh@pobox.com>
Wed, 11 Jun 2014 01:08:02 +0000 (21:08 -0400)
doing SASL.  Fix suggested by Michael Urban.

sbr/credentials.c

index ae53a742b9b6ecc0f6bda3a63f2a791d585ce2a3..ff4ee84e03198bf5b9955c06e4bce2b50d2406f0 100644 (file)
@@ -48,8 +48,8 @@ nmh_get_credentials (char *host, char *user, int sasl, nmh_creds_t creds) {
     creds->host = host;
 
     if (cred_style == NULL  ||  ! strcmp (cred_style, "legacy")) {
     creds->host = host;
 
     if (cred_style == NULL  ||  ! strcmp (cred_style, "legacy")) {
+       creds->user = user == NULL  ?  getusername ()  :  user;
         if (sasl) {
         if (sasl) {
-            creds->user = user == NULL  ?  getusername ()  :  user;
 
             /* This is what inc.c and msgchk.c used to contain. */
             /* Only inc.c and msgchk.c do this.  smtp.c doesn't. */
 
             /* This is what inc.c and msgchk.c used to contain. */
             /* Only inc.c and msgchk.c do this.  smtp.c doesn't. */