diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | fetchmail.c | 4 | ||||
-rw-r--r-- | rcfile_y.y | 6 |
3 files changed, 6 insertions, 5 deletions
@@ -14,6 +14,7 @@ fetchmail-5.0.9 (): and works with at least one server. * Federico G. Schwindt's fix for NetBSD/OpenBSD --with-kerberos. * auth keyword and option changed to preauth. +* Correct the exit value when .fetchmailrc permissions are wrong. There are 264 people on fetchmail-friends and 441 on fetchmail-announce. diff --git a/fetchmail.c b/fetchmail.c index b8e950ef..80a15563 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -910,8 +910,8 @@ static int load_params(int argc, char **argv, int optind) def_opts.listener = SMTP_MODE; /* this builds the host list */ - if (prc_parse_file(rcfile, !versioninfo) != 0) - exit(PS_SYNTAX); + if ((st = prc_parse_file(rcfile, !versioninfo)) != 0) + exit(st); if ((implicitmode = (optind >= argc))) { @@ -387,14 +387,14 @@ int prc_filecheck(const char *pathname, const flag securecheck) if ((statbuf.st_mode & S_IFLNK) == S_IFLNK) { fprintf(stderr, "File %s must not be a symbolic link.\n", pathname); - return(PS_AUTHFAIL); + return(PS_IOERR); } if (statbuf.st_mode & ~(S_IFREG | S_IREAD | S_IWRITE | S_IEXEC | S_IXGRP)) { fprintf(stderr, "File %s must have no more than -rwx--x--- (0710) permissions.\n", pathname); - return(PS_AUTHFAIL); + return(PS_IOERR); } #ifdef HAVE_GETEUID @@ -404,7 +404,7 @@ int prc_filecheck(const char *pathname, const flag securecheck) #endif /* HAVE_GETEUID */ { fprintf(stderr, "File %s must be owned by you.\n", pathname); - return(PS_AUTHFAIL); + return(PS_IOERR); } #endif return(PS_SUCCESS); |