diff options
| author | Eric W. Biederman <ebiederm@xmission.com> | 2015-05-09 22:09:14 -0500 |
|---|---|---|
| committer | Luis Henriques <luis.henriques@canonical.com> | 2015-07-15 10:01:06 +0100 |
| commit | 452452beb88f93d280c6b6540fd434f98930eab6 (patch) | |
| tree | 0eff088325a756013332d781784cf2320bd84a75 /include/linux/sysctl.h | |
| parent | 8f94859743e838044eab15862d75b35b9e70d688 (diff) | |
sysctl: Allow creating permanently empty directories that serve as mountpoints.
commit f9bd6733d3f11e24f3949becf277507d422ee1eb upstream.
Add a magic sysctl table sysctl_mount_point that when used to
create a directory forces that directory to be permanently empty.
Update the code to use make_empty_dir_inode when accessing permanently
empty directories.
Update the code to not allow adding to permanently empty directories.
Update /proc/sys/fs/binfmt_misc to be a permanently empty directory.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'include/linux/sysctl.h')
| -rw-r--r-- | include/linux/sysctl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 14a8ff2de11e..07e597b8802f 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -190,6 +190,9 @@ struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path, void unregister_sysctl_table(struct ctl_table_header * table); extern int sysctl_init(void); + +extern struct ctl_table sysctl_mount_point[]; + #else /* CONFIG_SYSCTL */ static inline struct ctl_table_header *register_sysctl_table(struct ctl_table * table) { |
