X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/d850c88b75c333607ef22e50ffced3914297a4b8..86c5ebc87:/sbr/ruserpass.c?ds=inline diff --git a/sbr/ruserpass.c b/sbr/ruserpass.c index f5fc6bd8..1d946fa2 100644 --- a/sbr/ruserpass.c +++ b/sbr/ruserpass.c @@ -107,8 +107,8 @@ ruserpass(const char *host, char **aname, char **apass, int flags) (stb.st_mode & 077) != 0) { /* We make this a fatal error to force the user to correct it. */ - advise(NULL, "Error - file %s must not be world or " - "group readable.", credentials_file); + advise(NULL, "group or other permissions, %#o, " + "forbidden: %s", stb.st_mode, credentials_file); adios(NULL, "Remove password or correct file " "permissions."); } @@ -147,7 +147,7 @@ ruserpass(const char *host, char **aname, char **apass, int flags) } printf("Name (%s:%s): ", host, myname); - if (fgets(tmp, sizeof(tmp) - 1, stdin) == NULL) { + if (fgets(tmp, sizeof tmp, stdin) == NULL) { advise ("tmp", "fgets"); } TrimSuffixC(tmp, '\n');