From bc1cc6dddad4bcec665d32fe6b2876b87c647fc5 Mon Sep 17 00:00:00 2001 From: ache Date: Sat, 5 Nov 1994 17:07:14 +0000 Subject: test produce wrong results for superuser, i.e. tells that file is unreadable when it is readable infact. --- bin/test/test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/test/test.c b/bin/test/test.c index c13d0c6..e925c1b 100644 --- a/bin/test/test.c +++ b/bin/test/test.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: test.c,v 1.4 1994/09/24 02:59:15 davidg Exp $ */ #ifndef lint @@ -348,7 +348,7 @@ expr_operator(op, sp, fs) goto permission; case ISEXEC: i = S_IXOTH; -permission: if (fs->stat.st_uid == geteuid()) +permission: if (geteuid() == 0 || fs->stat.st_uid == geteuid()) i <<= 6; else if (fs->stat.st_gid == getegid()) i <<= 3; -- cgit v1.1