diff options
Diffstat (limited to 'include/linux/sysctl.h')
-rw-r--r-- | include/linux/sysctl.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 4f5047df8a9e..89faebfe48b8 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -945,7 +945,10 @@ enum | |||
945 | 945 | ||
946 | /* For the /proc/sys support */ | 946 | /* For the /proc/sys support */ |
947 | struct ctl_table; | 947 | struct ctl_table; |
948 | struct nsproxy; | ||
948 | extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev); | 949 | extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev); |
950 | extern struct ctl_table_header *__sysctl_head_next(struct nsproxy *namespaces, | ||
951 | struct ctl_table_header *prev); | ||
949 | extern void sysctl_head_finish(struct ctl_table_header *prev); | 952 | extern void sysctl_head_finish(struct ctl_table_header *prev); |
950 | extern int sysctl_perm(struct ctl_table *table, int op); | 953 | extern int sysctl_perm(struct ctl_table *table, int op); |
951 | 954 | ||
@@ -1049,6 +1052,13 @@ struct ctl_table | |||
1049 | void *extra2; | 1052 | void *extra2; |
1050 | }; | 1053 | }; |
1051 | 1054 | ||
1055 | struct ctl_table_root { | ||
1056 | struct list_head root_list; | ||
1057 | struct list_head header_list; | ||
1058 | struct list_head *(*lookup)(struct ctl_table_root *root, | ||
1059 | struct nsproxy *namespaces); | ||
1060 | }; | ||
1061 | |||
1052 | /* struct ctl_table_header is used to maintain dynamic lists of | 1062 | /* struct ctl_table_header is used to maintain dynamic lists of |
1053 | struct ctl_table trees. */ | 1063 | struct ctl_table trees. */ |
1054 | struct ctl_table_header | 1064 | struct ctl_table_header |
@@ -1057,12 +1067,26 @@ struct ctl_table_header | |||
1057 | struct list_head ctl_entry; | 1067 | struct list_head ctl_entry; |
1058 | int used; | 1068 | int used; |
1059 | struct completion *unregistering; | 1069 | struct completion *unregistering; |
1070 | struct ctl_table *ctl_table_arg; | ||
1071 | struct ctl_table_root *root; | ||
1072 | }; | ||
1073 | |||
1074 | /* struct ctl_path describes where in the hierarchy a table is added */ | ||
1075 | struct ctl_path { | ||
1076 | const char *procname; | ||
1077 | int ctl_name; | ||
1060 | }; | 1078 | }; |
1061 | 1079 | ||
1080 | void register_sysctl_root(struct ctl_table_root *root); | ||
1081 | struct ctl_table_header *__register_sysctl_paths( | ||
1082 | struct ctl_table_root *root, struct nsproxy *namespaces, | ||
1083 | const struct ctl_path *path, struct ctl_table *table); | ||
1062 | struct ctl_table_header *register_sysctl_table(struct ctl_table * table); | 1084 | struct ctl_table_header *register_sysctl_table(struct ctl_table * table); |
1085 | struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path, | ||
1086 | struct ctl_table *table); | ||
1063 | 1087 | ||
1064 | void unregister_sysctl_table(struct ctl_table_header * table); | 1088 | void unregister_sysctl_table(struct ctl_table_header * table); |
1065 | int sysctl_check_table(struct ctl_table *table); | 1089 | int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table); |
1066 | 1090 | ||
1067 | #else /* __KERNEL__ */ | 1091 | #else /* __KERNEL__ */ |
1068 | 1092 | ||