aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--fetchmail.c4
-rw-r--r--rcfile_y.y6
3 files changed, 6 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index b2a9cbf0..e08ebe2f 100644
--- a/NEWS
+++ b/NEWS
@@ -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)))
{
diff --git a/rcfile_y.y b/rcfile_y.y
index 1c56cc96..57e47444 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -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);