test produce wrong results for superuser, i.e. tells
that file is unreadable when it is readable infact.
This commit is contained in:
parent
fe3e9e3cb9
commit
3b0beab69c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4166
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user