summaryrefslogtreecommitdiff
path: root/gnu/usr.sbin/sendmail/libsmutil
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-01-14 03:21:42 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-01-14 03:21:42 +0000
commit329cc2cc87730afac9b71e587a23dd70c8b53901 (patch)
tree82a4eac04f293758bda7297055a7c8e1236b4b76 /gnu/usr.sbin/sendmail/libsmutil
parent67e6877326ec09684a9203da8452b23c01cd134c (diff)
update to sendmail-8.12.2
Diffstat (limited to 'gnu/usr.sbin/sendmail/libsmutil')
-rw-r--r--gnu/usr.sbin/sendmail/libsmutil/safefile.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gnu/usr.sbin/sendmail/libsmutil/safefile.c b/gnu/usr.sbin/sendmail/libsmutil/safefile.c
index fbddc2de527..8da12ea4193 100644
--- a/gnu/usr.sbin/sendmail/libsmutil/safefile.c
+++ b/gnu/usr.sbin/sendmail/libsmutil/safefile.c
@@ -15,7 +15,7 @@
#include <sm/io.h>
#include <sm/errstring.h>
-SM_RCSID("@(#)$Sendmail: safefile.c,v 8.118 2001/09/18 21:45:27 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: safefile.c,v 8.121 2001/10/11 21:46:13 gshapiro Exp $")
/*
@@ -206,6 +206,7 @@ safefile(fn, uid, gid, user, flags, mode, st)
{
int md = S_IWRITE|S_IEXEC;
+ ret = 0;
if (stbuf.st_uid == uid)
/* EMPTY */
;
@@ -237,9 +238,10 @@ safefile(fn, uid, gid, user, flags, mode, st)
md >>= 3;
}
if ((stbuf.st_mode & md) != md)
- errno = EACCES;
+ ret = errno = EACCES;
}
- ret = errno;
+ else
+ ret = errno;
if (tTd(44, 4))
sm_dprintf("\t[final dir %s uid %d mode %lo] %s\n",
dir, (int) stbuf.st_uid,