]> diplodocus.org Git - nmh/blobdiff - sbr/credentials.c
Added start_test/finish_test to a bunch of tests.
[nmh] / sbr / credentials.c
index b610b2b..21ffe6c 100644 (file)
@@ -5,9 +5,14 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
-#include <h/utils.h>
-#include <h/mts.h>
+#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)) {
         /*