X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b02a191a4c725fb987c56dc41b2a81fbd6bff44c..64ef3b3008a7b990c2c856c24354ed2cabcc76dc:/sbr/ruserpass.c?ds=inline diff --git a/sbr/ruserpass.c b/sbr/ruserpass.c index a55f6803..7892cbfd 100644 --- a/sbr/ruserpass.c +++ b/sbr/ruserpass.c @@ -102,7 +102,8 @@ ruserpass(char *host, char **aname, char **apass) break; case PASSWD: - if (fstat(fileno(cfile), &stb) >= 0 && + if (!credentials_no_perm_check && + fstat(fileno(cfile), &stb) >= 0 && (stb.st_mode & 077) != 0) { /* We make this a fatal error to force the user to correct it. */ @@ -152,7 +153,7 @@ ruserpass(char *host, char **aname, char **apass) advise ("tmp", "fgets"); } tmp[strlen(tmp) - 1] = '\0'; - if (*tmp != '\0') { + if (*tmp != '\0' || myname == NULL) { myname = tmp; }