/[linux-patches]/hardened/2.6/trunk/2.6.16/4455_proc_usergroup_define-fixes.patch
Gentoo

Contents of /hardened/2.6/trunk/2.6.16/4455_proc_usergroup_define-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 356 - (show annotations) (download)
Fri Mar 31 12:42:11 2006 UTC (8 years, 3 months ago) by johnm
File size: 4659 byte(s)
Adding define CONFIG_PROC_USERGROUP fixes
1 Index: linux/drivers/pci/proc.c
2 ===================================================================
3 --- linux/drivers/pci/proc.c
4 +++ linux/drivers/pci/proc.c
5 @@ -572,7 +572,7 @@ static void legacy_proc_init(void)
6 #ifdef CONFIG_GRKERNSEC_PROC_ADD
7 #ifdef CONFIG_GRKERNSEC_PROC_USER
8 struct proc_dir_entry * entry = create_proc_entry("pci", S_IRUSR, NULL);
9 -#elif CONFIG_GRKERNSEC_PROC_USERGROUP
10 +#elif defined CONFIG_GRKERNSEC_PROC_USERGROUP
11 struct proc_dir_entry * entry = create_proc_entry("pci", S_IRUSR | S_IRGRP, NULL);
12 #endif
13 #else
14 @@ -609,7 +609,7 @@ static int __init pci_proc_init(void)
15 #ifdef CONFIG_GRKERNSEC_PROC_ADD
16 #ifdef CONFIG_GRKERNSEC_PROC_USER
17 proc_bus_pci_dir = proc_mkdir_mode("pci", S_IRUSR | S_IXUSR, proc_bus);
18 -#elif CONFIG_GRKERNSEC_PROC_USERGROUP
19 +#elif defined CONFIG_GRKERNSEC_PROC_USERGROUP
20 proc_bus_pci_dir = proc_mkdir_mode("pci", S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP, proc_bus);
21 #endif
22 #else
23 Index: linux/fs/proc/base.c
24 ===================================================================
25 --- linux/fs/proc/base.c
26 +++ linux/fs/proc/base.c
27 @@ -2045,7 +2045,7 @@ struct dentry *proc_pid_lookup(struct in
28
29 #ifdef CONFIG_GRKERNSEC_PROC_USER
30 inode->i_mode = S_IFDIR|S_IRUSR|S_IXUSR;
31 -#elif CONFIG_GRKERNSEC_PROC_USERGROUP
32 +#elif defined CONFIG_GRKERNSEC_PROC_USERGROUP
33 inode->i_mode = S_IFDIR|S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP;
34 inode->i_gid = CONFIG_GRKERNSEC_PROC_GID;
35 #else
36 Index: linux/fs/proc/proc_misc.c
37 ===================================================================
38 --- linux/fs/proc/proc_misc.c
39 +++ linux/fs/proc/proc_misc.c
40 @@ -737,7 +737,7 @@ void __init proc_misc_init(void)
41
42 #ifdef CONFIG_GRKERNSEC_PROC_USER
43 gr_mode = S_IRUSR;
44 -#elif CONFIG_GRKERNSEC_PROC_USERGROUP
45 +#elif defined CONFIG_GRKERNSEC_PROC_USERGROUP
46 gr_mode = S_IRUSR | S_IRGRP;
47 #endif
48 #ifdef CONFIG_GRKERNSEC_PROC_ADD
49 Index: linux/fs/proc/root.c
50 ===================================================================
51 --- linux/fs/proc/root.c
52 +++ linux/fs/proc/root.c
53 @@ -55,7 +55,7 @@ void __init proc_root_init(void)
54 proc_misc_init();
55 #ifdef CONFIG_GRKERNSEC_PROC_USER
56 proc_net = proc_mkdir_mode("net", S_IRUSR | S_IXUSR, NULL);
57 -#elif CONFIG_GRKERNSEC_PROC_USERGROUP
58 +#elif defined CONFIG_GRKERNSEC_PROC_USERGROUP
59 proc_net = proc_mkdir_mode("net", S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP, NULL);
60 #else
61 proc_net = proc_mkdir("net", NULL);
62 @@ -86,7 +86,7 @@ void __init proc_root_init(void)
63 #ifdef CONFIG_GRKERNSEC_PROC_ADD
64 #ifdef CONFIG_GRKERNSEC_PROC_USER
65 proc_bus = proc_mkdir_mode("bus", S_IRUSR | S_IXUSR, NULL);
66 -#elif CONFIG_GRKERNSEC_PROC_USERGROUP
67 +#elif defined CONFIG_GRKERNSEC_PROC_USERGROUP
68 proc_bus = proc_mkdir_mode("bus", S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP, NULL);
69 #endif
70 #else
71 Index: linux/kernel/configs.c
72 ===================================================================
73 --- linux/kernel/configs.c
74 +++ linux/kernel/configs.c
75 @@ -92,7 +92,7 @@ static int __init ikconfig_init(void)
76 #ifdef CONFIG_GRKERNSEC_PROC_ADD
77 #ifdef CONFIG_GRKERNSEC_PROC_USER
78 entry = create_proc_entry("config.gz", S_IFREG | S_IRUSR, &proc_root);
79 -#elif CONFIG_GRKERNSEC_PROC_USERGROUP
80 +#elif defined CONFIG_GRKERNSEC_PROC_USERGROUP
81 entry = create_proc_entry("config.gz", S_IFREG | S_IRUSR | S_IRGRP, &proc_root);
82 #endif
83 #else
84 Index: linux/kernel/kallsyms.c
85 ===================================================================
86 --- linux/kernel/kallsyms.c
87 +++ linux/kernel/kallsyms.c
88 @@ -413,7 +413,7 @@ static int __init kallsyms_init(void)
89 #ifdef CONFIG_GRKERNSEC_PROC_ADD
90 #ifdef CONFIG_GRKERNSEC_PROC_USER
91 entry = create_proc_entry("kallsyms", S_IFREG | S_IRUSR, NULL);
92 -#elif CONFIG_GRKERNSEC_PROC_USERGROUP
93 +#elif defined CONFIG_GRKERNSEC_PROC_USERGROUP
94 entry = create_proc_entry("kallsyms", S_IFREG | S_IRUSR | S_IRGRP, NULL);
95 #endif
96 #else
97 Index: linux/kernel/resource.c
98 ===================================================================
99 --- linux/kernel/resource.c
100 +++ linux/kernel/resource.c
101 @@ -139,7 +139,7 @@ static int __init ioresources_init(void)
102 #ifdef CONFIG_GRKERNSEC_PROC_ADD
103 #ifdef CONFIG_GRKERNSEC_PROC_USER
104 entry = create_proc_entry("ioports", S_IRUSR, NULL);
105 -#elif CONFIG_GRKERNSEC_PROC_USERGROUP
106 +#elif defined CONFIG_GRKERNSEC_PROC_USERGROUP
107 entry = create_proc_entry("ioports", S_IRUSR | S_IRGRP, NULL);
108 #endif
109 #else
110 @@ -151,7 +151,7 @@ static int __init ioresources_init(void)
111 #ifdef CONFIG_GRKERNSEC_PROC_ADD
112 #ifdef CONFIG_GRKERNSEC_PROC_USER
113 entry = create_proc_entry("iomem", S_IRUSR, NULL);
114 -#elif CONFIG_GRKERNSEC_PROC_USERGROUP
115 +#elif defined CONFIG_GRKERNSEC_PROC_USERGROUP
116 entry = create_proc_entry("iomem", S_IRUSR | S_IRGRP, NULL);
117 #endif
118 #else

  ViewVC Help
Powered by ViewVC 1.1.20