diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 1999-01-21 00:55:32 +0000 | 
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 1999-01-21 00:55:32 +0000 | 
| commit | 76b5366091f76c9bc73570149ef5055648fc2c39 (patch) | |
| tree | 590d020e0f2a5bea6e09d66d951a674443b21d67 /contrib/sendmail/src/safefile.c | |
| parent | 4b4d01da6f07f7754ff6a6e4f5223e9f0984d1a6 (diff) | |
Diffstat (limited to 'contrib/sendmail/src/safefile.c')
| -rw-r--r-- | contrib/sendmail/src/safefile.c | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/contrib/sendmail/src/safefile.c b/contrib/sendmail/src/safefile.c index ff94b3d243bf4..16f3f3927c993 100644 --- a/contrib/sendmail/src/safefile.c +++ b/contrib/sendmail/src/safefile.c @@ -11,7 +11,7 @@   */  #ifndef lint -static char sccsid[] = "@(#)safefile.c	8.43 (Berkeley) 10/13/1998"; +static char sccsid[] = "@(#)safefile.c	8.40 (Berkeley) 6/5/98";  #endif /* not lint */  # include "sendmail.h" @@ -102,7 +102,7 @@ safefile(fn, uid, gid, uname, flags, mode, st)  		if (bitset(S_ISUID, st->st_mode))  #else  		if (bitset(S_ISUID, st->st_mode) && st->st_uid != 0 && -		    st->st_uid != TrustedUid) +		    st->st_uid != TrustedFileUid)  #endif  		{  			uid = st->st_uid; @@ -206,7 +206,7 @@ safefile(fn, uid, gid, uname, flags, mode, st)  			if (stbuf.st_uid == uid)  				; -			else if (uid == 0 && stbuf.st_uid == TrustedUid) +			else if (uid == 0 && TrustedFileUid != 0 && stbuf.st_uid == TrustedFileUid)  				;  			else  			{ @@ -299,7 +299,7 @@ safefile(fn, uid, gid, uname, flags, mode, st)  		mode >>= 6;  	else if (st->st_uid == uid)  		; -	else if (uid == 0 && st->st_uid == TrustedUid) +	else if (uid == 0 && TrustedFileUid != 0 && st->st_uid == TrustedFileUid)  		;  	else  	{ @@ -328,7 +328,7 @@ safefile(fn, uid, gid, uname, flags, mode, st)  			(int) st->st_uid, (int) st->st_nlink,  			(u_long) st->st_mode, (u_long) mode);  	if ((st->st_uid == uid || st->st_uid == 0 || -	     st->st_uid == TrustedUid || +	     st->st_uid == TrustedFileUid ||  	     !bitset(SFF_MUSTOWN, flags)) &&  	    (st->st_mode & mode) == mode)  	{ @@ -429,9 +429,9 @@ safedirpath(fn, uid, gid, uname, flags)  		}  		/* -		**  Let OS determine access to file if we are not -		**  running as a privileged user.  This allows ACLs -		**  to work. +		** Let OS determine access to file if we are not +		** running as a privileged user.  This allows ACLs +		** to work.  		*/  		if (geteuid() != 0)  			continue; | 
