summaryrefslogtreecommitdiff
path: root/fs/aufs/vfsub.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-02-28 05:29:16 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-02-28 05:29:16 -0300
commit844e3cded9c8665e95b1e43b707a6c3adcbc901f (patch)
treedd9cccb325c949319a9de3e0cabad91d6261fa75 /fs/aufs/vfsub.c
parent6d461a4fe7896faa1aec5a5417888cf179e46b9f (diff)
Linux-libre 4.4.3-gnu
Diffstat (limited to 'fs/aufs/vfsub.c')
-rw-r--r--fs/aufs/vfsub.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/aufs/vfsub.c b/fs/aufs/vfsub.c
index f072c59c0..89f999c97 100644
--- a/fs/aufs/vfsub.c
+++ b/fs/aufs/vfsub.c
@@ -7,10 +7,28 @@
*/
#include <linux/namei.h>
+#include <linux/nsproxy.h>
#include <linux/security.h>
#include <linux/splice.h>
+#include "../fs/mount.h"
#include "aufs.h"
+#ifdef CONFIG_AUFS_BR_FUSE
+int vfsub_test_mntns(struct vfsmount *mnt, struct super_block *h_sb)
+{
+ struct nsproxy *ns;
+
+ if (!au_test_fuse(h_sb) || !au_userns)
+ return 0;
+
+ ns = current->nsproxy;
+ /* no {get,put}_nsproxy(ns) */
+ return real_mount(mnt)->mnt_ns == ns->mnt_ns ? 0 : -EACCES;
+}
+#endif
+
+/* ---------------------------------------------------------------------- */
+
int vfsub_update_h_iattr(struct path *h_path, int *did)
{
int err;