From 67b3b53f0bc8656573ec6da51b0cfe5258cb454d Mon Sep 17 00:00:00 2001 From: David Nugent Date: Thu, 15 May 1997 06:06:32 +0000 Subject: For non-root uids, consider root-owned files also 'secure' unless otherwise disqualified. --- libutil/_secure_path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libutil/_secure_path.c') diff --git a/libutil/_secure_path.c b/libutil/_secure_path.c index 38a974e..01c29bf 100644 --- a/libutil/_secure_path.c +++ b/libutil/_secure_path.c @@ -18,7 +18,7 @@ * 5. Modifications may be freely made to this file providing the above * conditions are met. * - * $Id$ + * $Id: _secure_path.c,v 1.1 1997/05/10 18:55:37 davidn Exp $ */ @@ -57,7 +57,7 @@ _secure_path(const char *path, uid_t uid, gid_t gid) msg = "%s: %s is not a regular file"; else if (sb.st_mode & S_IWOTH) msg = "%s: %s is world writable"; - else if (uid != -1 && sb.st_uid != uid) { + else if (uid != -1 && sb.st_uid != uid && sb.st_uid != 0) { if (uid == 0) msg = "%s: %s is not owned by root"; else -- cgit v1.2.3-56-ge451