X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/92c3b05ef3e582d64b3cecfc261fdd66ef13a4ef..4d5d51e903a42c23800540930244448c4aacae16:/sbr/credentials.c diff --git a/sbr/credentials.c b/sbr/credentials.c index b610b2b9..21ffe6c9 100644 --- a/sbr/credentials.c +++ b/sbr/credentials.c @@ -5,9 +5,14 @@ * complete copyright information. */ -#include -#include -#include +#include "h/mh.h" +#include "concat.h" +#include "ruserpass.h" +#include "credentials.h" +#include "context_find.h" +#include "error.h" +#include "h/utils.h" +#include "h/mts.h" #include "m_maildir.h" struct nmh_creds { @@ -17,7 +22,8 @@ struct nmh_creds { }; void -init_credentials_file(void) { +init_credentials_file(void) +{ if (credentials_file == NULL) { char *cred_style = context_find ("credentials"); @@ -69,7 +75,7 @@ nmh_get_credentials (const char *host, const char *user) creds->pass = NULL; if (cred_style == NULL || ! strcmp (cred_style, "legacy")) { - creds->user = user == NULL ? mh_xstrdup(getusername ()) : mh_xstrdup(user); + creds->user = user == NULL ? mh_xstrdup(getusername (1)) : mh_xstrdup(user); } else if (! strncasecmp (cred_style, "file:", 5) || ! strncasecmp (cred_style, "file-nopermcheck:", 17)) { /*