patch-2.4.0-test12 linux/fs/exec.c

Next file: linux/fs/ext2/fsync.c
Previous file: linux/fs/dquot.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test11/linux/fs/exec.c linux/fs/exec.c
@@ -604,6 +604,8 @@
 	/* Huh? We had already checked for MAY_EXEC, WTF do we check this? */
 	if (!(mode & 0111))	/* with at least _one_ execute bit set */
 		return -EACCES;
+	if (bprm->file->f_op == NULL)
+		return -EACCES;
 
 	bprm->e_uid = current->euid;
 	bprm->e_gid = current->egid;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)