diff options
Diffstat (limited to 'libdiskfs/file-exec.c')
-rw-r--r-- | libdiskfs/file-exec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libdiskfs/file-exec.c b/libdiskfs/file-exec.c index f332e700..1c6f6f70 100644 --- a/libdiskfs/file-exec.c +++ b/libdiskfs/file-exec.c @@ -71,6 +71,9 @@ diskfs_S_file_exec (struct protid *cred, gid = np->dn_stat.st_uid; mutex_unlock (&np->lock); + if (noexec) + return EACCES; + if ((cred->po->openstat & O_EXEC) == 0) return EBADF; @@ -83,7 +86,7 @@ diskfs_S_file_exec (struct protid *cred, suid = mode & S_ISUID; sgid = mode & S_ISGID; - if (suid || sgid) + if (!nosuid && (suid || sgid)) { int secure = 0; error_t get_file_ids (struct idvec *uids, struct idvec *gids) |