X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/a1067dea91a4cb3fc71b0b33271d2c7c9c8a2d7a..50c8114d791602fcc427c6dc94b55f3226e8a21d:/uip/inc.c diff --git a/uip/inc.c b/uip/inc.c index f169fc7d..cd98ddb8 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -29,7 +29,6 @@ #include #include #include - #include #include #include @@ -37,8 +36,6 @@ #include #include #include -#include -#include #ifndef CYRUS_SASL # define SASLminc(a) (a) @@ -190,7 +187,6 @@ main (int argc, char **argv) char *maildir_copy = NULL; /* copy of mail directory because the static gets overwritten */ int nmsgs, nbytes; - char *pass = NULL; char *MAILHOST_env_variable; done=inc_done; @@ -391,18 +387,14 @@ main (int argc, char **argv) * a POP server? */ if (inc_type == INC_POP) { - if (user == NULL) - user = getusername (); - if (sasl) - pass = getusername (); - else - ruserpass (host, &user, &pass); + struct nmh_creds creds = { 0, 0, 0 }; /* * initialize POP connection */ - if (pop_init (host, port, user, pass, proxy, snoop, sasl, - saslmech) == NOTOK) + nmh_get_credentials (host, user, sasl, &creds); + if (pop_init (host, port, creds.user, creds.password, proxy, snoop, + sasl, saslmech) == NOTOK) adios (NULL, "%s", response); /* Check if there are any messages */