aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
51b6ba077791f2f8c876022b37419be7a2ceec3'>e51b6ba07779
fc6cd25b738c



e51b6ba07779
fc6cd25b738c

83ac201b4f06
fc6cd25b738c

fc6cd25b738c
814ecf6e5b78
fc6cd25b738c
fc6cd25b738c
fc6cd25b738c








fc6cd25b738c



fc6cd25b738c
83ac201b4f06
fc6cd25b738c
fc6cd25b738c










8c85dd8730bf
814ecf6e5b78
fc6cd25b738c
49ffcf8f99e8
e51b6ba07779
fc6cd25b738c
99541c23cd32

fc6cd25b738c




e51b6ba07779
fc6cd25b738c


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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

                         




                                           






















                                                                      












                                                                      

 

                                                                        






                                      

                                                               



                                                       
                                              







                                                                         





















                                                                                 
                             



                    

                                                                           


                              
                                                     



                                                               
                                                                           

                      
                                          

                                        
                                    
                                                     
                                                                                  
                 








                                                                                      



                                                                                
                        
                                                                     
                                                                     










                                                                                         
                         
                                                 
                                                                          
      
                                                                    
                 

                                                              




                                                     
                                                                              


                     
#include <linux/stat.h>
#include <linux/sysctl.h>
#include "../fs/xfs/linux-2.6/xfs_sysctl.h"
#include <linux/sunrpc/debug.h>
#include <linux/string.h>
#include <net/ip_vs.h>


static int sysctl_depth(struct ctl_table *table)
{
	struct ctl_table *tmp;
	int depth;

	depth = 0;
	for (tmp = table; tmp->parent; tmp = tmp->parent)
		depth++;

	return depth;
}

static struct ctl_table *sysctl_parent(struct ctl_table *table, int n)
{
	int i;

	for (i = 0; table && i < n; i++)
		table = table->parent;

	return table;
}


static void sysctl_print_path(struct ctl_table *table)
{
	struct ctl_table *tmp;
	int depth, i;
	depth = sysctl_depth(table);
	if (table->procname) {
		for (i = depth; i >= 0; i--) {
			tmp = sysctl_parent(table, i);
			printk("/%s", tmp->procname?tmp->procname:"");
		}
	}
	printk(" ");
}

static struct ctl_table *sysctl_check_lookup(struct nsproxy *namespaces,
						struct ctl_table *table)
{
	struct ctl_table_header *head;
	struct ctl_table *ref, *test;
	int depth, cur_depth;

	depth = sysctl_depth(table);

	for (head = __sysctl_head_next(namespaces, NULL); head;
	     head = __sysctl_head_next(namespaces, head)) {
		cur_depth = depth;
		ref = head->ctl_table;
repeat:
		test = sysctl_parent(table, cur_depth);
		for (; ref->procname; ref++) {
			int match = 0;
			if (cur_depth && !ref->child)
				continue;

			if (test->procname && ref->procname &&
			    (strcmp(test->procname, ref->procname) == 0))