X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c0c8235326353f08fb3d695c601f454f32f2465c..02b04f3b19b8bd69ae292eeb2c2d7eec410506f2:/sbr/credentials.c diff --git a/sbr/credentials.c b/sbr/credentials.c index 8dd6129a..32bc7920 100644 --- a/sbr/credentials.c +++ b/sbr/credentials.c @@ -38,7 +38,7 @@ init_credentials_file () { credentials_file = concat (mypath ? mypath : ".", "/", filename, NULL); if (stat (credentials_file, &st) != OK) { - admonish (NULL, "unable to find credentials file %s", + inform("unable to find credentials file %s, continuing...", filename); } } @@ -61,12 +61,12 @@ nmh_get_credentials (const char *host, const char *user) creds = mh_xmalloc(sizeof(*creds)); - creds->host = getcpy(host); + creds->host = mh_xstrdup(host); creds->user = NULL; creds->pass = NULL; if (cred_style == NULL || ! strcmp (cred_style, "legacy")) { - creds->user = user == NULL ? getcpy(getusername ()) : getcpy(user); + creds->user = user == NULL ? mh_xstrdup(getusername ()) : mh_xstrdup(user); } else if (! strncasecmp (cred_style, "file:", 5) || ! strncasecmp (cred_style, "file-nopermcheck:", 17)) { /* @@ -77,9 +77,9 @@ nmh_get_credentials (const char *host, const char *user) * 3) interactively request from user (as long as the * credentials file didn't have a "default" token) */ - creds->user = user == NULL ? NULL : getcpy(user); + creds->user = user == NULL ? NULL : mh_xstrdup(user); } else { - admonish (NULL, "unknown credentials style %s", cred_style); + inform("unknown credentials style %s, continuing...", cred_style); return NULL; }