diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-03-22 23:21:15 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-03-22 23:21:15 +0000 |
commit | 96f1a96273434ff1bd200aa6118d1179d2215137 (patch) | |
tree | fdb92e79c012233b2c0d35351532e10f149664c4 | |
parent | f90ef78d8456cd32919d0df196ef7d7f07db5f6d (diff) |
Formerly file-exec.c.~4~
-rw-r--r-- | libdiskfs/file-exec.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libdiskfs/file-exec.c b/libdiskfs/file-exec.c index a97924d7..5cdcd05b 100644 --- a/libdiskfs/file-exec.c +++ b/libdiskfs/file-exec.c @@ -51,7 +51,7 @@ diskfs_S_file_exec (struct protid *cred, return EOPNOTSUPP; np = cred->po->np; - if ((cred->po->flags & O_EXEC) == 0) + if ((cred->po->openstat & O_EXEC) == 0) return EBADF; if (!((np->dn_stat.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) || ((np->dn_stat.st_mode & S_IUSEUNK) @@ -60,10 +60,11 @@ diskfs_S_file_exec (struct protid *cred, /* Handle S_ISUID and S_ISGID uid substitution. */ /* XXX We should change the auth handle here too. */ - if (((np->dn_stat.st_mode & S_ISUID) - && !diskfs_isuid (np->dn_stat.st_uid, cred)) - || ((np->dn_stat.st_mode & S_ISGID) - && !diskfs_groupmember (np->dn_stat.st_gid, cred))) + if ((((np->dn_stat.st_mode & S_ISUID) + && !diskfs_isuid (np->dn_stat.st_uid, cred)) + || ((np->dn_stat.st_mode & S_ISGID) + && !diskfs_groupmember (np->dn_stat.st_gid, cred))) + && !diskfs_isuid (0, cred)) flags |= EXEC_SECURE|EXEC_NEWTASK; if (diskfs_access (np, S_IREAD, cred)) |