aboutsummaryrefslogtreecommitdiffstats
path: root/rcfile_y.y
diff options
context:
space:
mode:
Diffstat (limited to 'rcfile_y.y')
-rw-r--r--rcfile_y.y4
1 files changed, 4 insertions, 0 deletions
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);