* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
strcpy(*aname, tokval);
}
break;
case PASSWD:
if (fstat(fileno(cfile), &stb) >= 0 &&
(stb.st_mode & 077) != 0) {
strcpy(*aname, tokval);
}
break;
case PASSWD:
if (fstat(fileno(cfile), &stb) >= 0 &&
(stb.st_mode & 077) != 0) {
- fprintf(stderr, "Error - .netrc file not correct mode.\n");
- fprintf(stderr, "Remove password or correct mode.\n");
- goto bad;
+ /* We make this a fatal error to force the user to correct it */
+ advise(NULL, "Error - ~/.netrc file must not be world or group readable.");
+ adios(NULL, "Remove password or correct file permissions.");
char *mypass;
snprintf(prompt, sizeof(prompt), "Password (%s:%s): ", host, *aname);
char *mypass;
snprintf(prompt, sizeof(prompt), "Password (%s:%s): ", host, *aname);