*BSD News Article 1799


Return to BSD News archive

Xref: sserve comp.bugs.4bsd:1855 comp.unix.bsd:1832 comp.unix.internals:4906
Path: sserve!manuel!munnari.oz.au!uunet!mcsun!sun4nl!tuegate.tue.nl!svin02!wzv!gvr.win.tue.nl!guido
From: guido@gvr.win.tue.nl (Guido van Rooij)
Newsgroups: comp.bugs.4bsd,comp.unix.bsd,comp.unix.internals
Subject: xxx_access wrong?
Message-ID: <3498@wzv.win.tue.nl>
Date: 2 Jul 92 20:51:25 GMT
Sender: news@wzv.win.tue.nl
Followup-To: comp.bugs.4bsd
Organization: Guido's home 486 box
Lines: 15

The following lines come from ufs_vnops.c, function ufs_access:
	/*
	 * If you're the super-user, you always get access.
	 */
	if (cred->cr_uid == 0)
		return (0);
I don't know, but I think this is wrong. When this function is called
to check for VEXEC access, the function should only return 0 if
one of the x-bits is set. The same thing is found in nfs_vnops.c.
Can anyone tell me if I am correct? And if I am not, how I can find
out in a filesystem independent way, when uid 0 can execute a file?
(It is definitely wrong that root should be able to execute a file
without any x-bit set)

-Guido