aboutsummaryrefslogtreecommitdiffstats
path: root/rcfile_y.y
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-05-22 21:39:15 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-05-22 21:39:15 +0000
commit99f3b480230cdc38b91dec08b361a97cc8c13b8d (patch)
tree09bcc1fe1e1f9d422605ee1bc6561405abc87250 /rcfile_y.y
parente97d69be53c031cf2c52d31eb2063c8bc89aa185 (diff)
downloadfetchmail-99f3b480230cdc38b91dec08b361a97cc8c13b8d.tar.gz
fetchmail-99f3b480230cdc38b91dec08b361a97cc8c13b8d.tar.bz2
fetchmail-99f3b480230cdc38b91dec08b361a97cc8c13b8d.zip
Gunther Leber's patch.
svn path=/trunk/; revision=1796
Diffstat (limited to 'rcfile_y.y')
-rw-r--r--rcfile_y.y7
1 files changed, 5 insertions, 2 deletions
diff --git a/rcfile_y.y b/rcfile_y.y
index 2427459b..4b25404b 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -319,9 +319,10 @@ void yyerror (const char *s)
prc_errflag++;
}
-int prc_filecheck(pathname)
+int prc_filecheck(pathname, securecheck)
/* check that a configuration file is secure */
const char *pathname; /* pathname for the configuration file */
+const flag securecheck;
{
#ifndef __EMX__
struct stat statbuf;
@@ -345,6 +346,8 @@ const char *pathname; /* pathname for the configuration file */
}
}
+ if (!securecheck) return 0;
+
if ((statbuf.st_mode & S_IFLNK) == S_IFLNK) {
fprintf(stderr, "File %s must not be a symbolic link.\n", pathname);
return(PS_AUTHFAIL);
@@ -373,7 +376,7 @@ int prc_parse_file (const char *pathname, const flag securecheck)
errno = 0;
/* Check that the file is secure */
- if (securecheck && (prc_errflag = prc_filecheck(pathname)) != 0)
+ if ( (prc_errflag = prc_filecheck(pathname, securecheck)) != 0 )
return(prc_errflag);
if (errno == ENOENT)