aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1999-03-07 17:36:33 +0000
committerEric S. Raymond <esr@thyrsus.com>1999-03-07 17:36:33 +0000
commit4acf011e3556517bf6c73fefab0073abefc05df0 (patch)
tree9d5076c6ed3ef514f658a341c496584c54ae9db8
parent3667f45fd338f4e1708c01f476e2705253199478 (diff)
downloadfetchmail-4acf011e3556517bf6c73fefab0073abefc05df0.tar.gz
fetchmail-4acf011e3556517bf6c73fefab0073abefc05df0.tar.bz2
fetchmail-4acf011e3556517bf6c73fefab0073abefc05df0.zip
GETEUID check.
svn path=/trunk/; revision=2398
-rw-r--r--NEWS4
-rw-r--r--configure.in5
-rw-r--r--rcfile_y.y4
3 files changed, 10 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 9dcc80bd..1234f18e 100644
--- a/NEWS
+++ b/NEWS
@@ -11,8 +11,10 @@ fetchmail-5.0.0 ():
* Fix lexical-analyzer bug that rejected `set nobouncemail',
* Prevent send_bouncemail from stepping on SMTP antispam response.
* Added French internationalization (LC_ALL=fr) from Guy Brand.
+* Added Hugo Rabson's script for fetching from Hotmail.
+* Test for .fetchmailrc ownership using geteuid() when possible.
-There are 262 people on fetchmail-friends and 356 on fetchmail-announce.
+There are 262 people on fetchmail-friends and 359 on fetchmail-announce.
fetchmail-4.7.8 (Mon Feb 22 10:06:04 EST 1999):
* FreeBSD support for interface and monitor options by Andy Doran <ad@psn.ie>.
diff --git a/configure.in b/configure.in
index 79c7ddc3..53b07e56 100644
--- a/configure.in
+++ b/configure.in
@@ -126,8 +126,9 @@ AC_SUBST(EXTRADEFS)
AC_SUBST(EXTRASRC)
AC_SUBST(EXTRAOBJ)
-AC_CHECK_FUNCS(tcsetattr stty setsid seteuid gethostbyname res_search herror \
- strrchr strerror setlinebuf syslog snprintf vprintf vsnprintf vsyslog \
+AC_CHECK_FUNCS(tcsetattr stty setsid geteuid seteuid gethostbyname \
+ res_search herror strrchr strerror setlinebuf syslog \
+ snprintf vprintf vsnprintf vsyslog \
atexit inet_aton strftime setrlimit socketpair sigprocmask)
# Under Red Hat 4.0 (and many other Linuxes) -lresolv is seriously flaky
diff --git a/rcfile_y.y b/rcfile_y.y
index 7935ba17..793426fc 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -397,7 +397,11 @@ int prc_filecheck(const char *pathname, const flag securecheck)
return(PS_AUTHFAIL);
}
+#ifdef HAVE_GETEUID
+ if (statbuf.st_uid != geteuid())
+#else
if (statbuf.st_uid != getuid())
+#endif /* HAVE_GETEUID */
{
fprintf(stderr, "File %s must be owned by you.\n", pathname);
return(PS_AUTHFAIL);