aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sysctl.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 77de3bfd8744..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 */
947struct ctl_table; 947struct ctl_table;
948struct nsproxy;
948extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev); 949extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev);
950extern struct ctl_table_header *__sysctl_head_next(struct nsproxy *namespaces,
951 struct ctl_table_header *prev);
949extern void sysctl_head_finish(struct ctl_table_header *prev); 952extern void sysctl_head_finish(struct ctl_table_header *prev);
950extern int sysctl_perm(struct ctl_table *table, int op); 953extern 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
1055struct 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. */
1054struct ctl_table_header 1064struct ctl_table_header
@@ -1058,6 +1068,7 @@ struct ctl_table_header
1058 int used; 1068 int used;
1059 struct completion *unregistering; 1069 struct completion *unregistering;
1060 struct ctl_table *ctl_table_arg; 1070 struct ctl_table *ctl_table_arg;
1071 struct ctl_table_root *root;
1061}; 1072};
1062 1073
1063/* struct ctl_path describes where in the hierarchy a table is added */ 1074/* struct ctl_path describes where in the hierarchy a table is added */
@@ -1066,12 +1077,16 @@ struct ctl_path {
1066 int ctl_name; 1077 int ctl_name;
1067}; 1078};
1068 1079
1080void register_sysctl_root(struct ctl_table_root *root);
1081struct 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);
1069struct ctl_table_header *register_sysctl_table(struct ctl_table * table); 1084struct ctl_table_header *register_sysctl_table(struct ctl_table * table);
1070struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path, 1085struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path,
1071 struct ctl_table *table); 1086 struct ctl_table *table);
1072 1087
1073void unregister_sysctl_table(struct ctl_table_header * table); 1088void unregister_sysctl_table(struct ctl_table_header * table);
1074int sysctl_check_table(struct ctl_table *table); 1089int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table);
1075 1090
1076#else /* __KERNEL__ */ 1091#else /* __KERNEL__ */
1077 1092