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. */
}
printf("Name (%s:%s): ", host, myname);
- fgets(tmp, sizeof(tmp) - 1, stdin);
+ if (fgets(tmp, sizeof(tmp) - 1, stdin) == NULL) {
+ advise ("tmp", "fgets");
+ }
tmp[strlen(tmp) - 1] = '\0';
- if (*tmp != '\0') {
+ if (*tmp != '\0' || myname == NULL) {
myname = tmp;
}