This file is indexed.

/usr/src/kernel-patches/lustre/patches/fmode-exec-2.6-sles10.patch is in linux-patch-lustre 1.8.5+dfsg-3ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Index: LINUX-SRC-TREE/include/linux/fs.h
===================================================================
--- LINUX-SRC-TREE.orig/include/linux/fs.h
+++ LINUX-SRC-TREE/include/linux/fs.h
@@ -61,6 +61,7 @@ extern int dir_notify_enable;
 
 #define FMODE_READ 1
 #define FMODE_WRITE 2
+#define FMODE_EXEC 16
 
 /* Internal kernel extensions */
 #define FMODE_LSEEK	4
Index: LINUX-SRC-TREE/fs/exec.c
===================================================================
--- LINUX-SRC-TREE.orig/fs/exec.c
+++ LINUX-SRC-TREE/fs/exec.c
@@ -129,7 +129,8 @@ asmlinkage long sys_uselib(const char __
 	struct nameidata nd;
 	int error;
 
-	error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ);
+	error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd,
+					FMODE_READ | FMODE_EXEC);
 	if (error)
 		goto out;
 
@@ -481,7 +483,8 @@ struct file *open_exec(const char *name)
 	int err;
 	struct file *file;
 
-	err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, FMODE_READ);
+	err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd,
+			       FMODE_READ | FMODE_EXEC);
 	file = ERR_PTR(err);
 
 	if (!err) {