Loading fs/fsopen.c +2 −2 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ SYSCALL_DEFINE2(fsopen, const char __user *, _fs_name, unsigned int, flags) const char *fs_name; int ret; if (!ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN)) if (!may_mount()) return -EPERM; if (flags & ~FSOPEN_CLOEXEC) Loading Loading @@ -162,7 +162,7 @@ SYSCALL_DEFINE3(fspick, int, dfd, const char __user *, path, unsigned int, flags unsigned int lookup_flags; int ret; if (!ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN)) if (!may_mount()) return -EPERM; if ((flags & ~(FSPICK_CLOEXEC | Loading fs/internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ extern int __mnt_want_write_file(struct file *); extern void __mnt_drop_write_file(struct file *); extern void dissolve_on_fput(struct vfsmount *); extern bool may_mount(void); int path_mount(const char *dev_name, struct path *path, const char *type_page, unsigned long flags, void *data_page); Loading fs/namespace.c +1 −1 Original line number Diff line number Diff line Loading @@ -1760,7 +1760,7 @@ void __detach_mounts(struct dentry *dentry) /* * Is the caller allowed to modify his namespace? */ static inline bool may_mount(void) bool may_mount(void) { return ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN); } Loading Loading
fs/fsopen.c +2 −2 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ SYSCALL_DEFINE2(fsopen, const char __user *, _fs_name, unsigned int, flags) const char *fs_name; int ret; if (!ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN)) if (!may_mount()) return -EPERM; if (flags & ~FSOPEN_CLOEXEC) Loading Loading @@ -162,7 +162,7 @@ SYSCALL_DEFINE3(fspick, int, dfd, const char __user *, path, unsigned int, flags unsigned int lookup_flags; int ret; if (!ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN)) if (!may_mount()) return -EPERM; if ((flags & ~(FSPICK_CLOEXEC | Loading
fs/internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ extern int __mnt_want_write_file(struct file *); extern void __mnt_drop_write_file(struct file *); extern void dissolve_on_fput(struct vfsmount *); extern bool may_mount(void); int path_mount(const char *dev_name, struct path *path, const char *type_page, unsigned long flags, void *data_page); Loading
fs/namespace.c +1 −1 Original line number Diff line number Diff line Loading @@ -1760,7 +1760,7 @@ void __detach_mounts(struct dentry *dentry) /* * Is the caller allowed to modify his namespace? */ static inline bool may_mount(void) bool may_mount(void) { return ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN); } Loading