|
@@ -24,6 +24,8 @@
|
|
|
#include <linux/parser.h>
|
|
|
#include <linux/statfs.h>
|
|
|
#include <linux/sched.h>
|
|
|
+#include <linux/nsproxy.h>
|
|
|
+#include <net/net_namespace.h>
|
|
|
#include "internal.h"
|
|
|
|
|
|
#define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */
|
|
@@ -363,6 +365,10 @@ static struct dentry *afs_mount(struct file_system_type *fs_type,
|
|
|
|
|
|
memset(¶ms, 0, sizeof(params));
|
|
|
|
|
|
+ ret = -EINVAL;
|
|
|
+ if (current->nsproxy->net_ns != &init_net)
|
|
|
+ goto error;
|
|
|
+
|
|
|
/* parse the options and device name */
|
|
|
if (options) {
|
|
|
ret = afs_parse_options(¶ms, options, &dev_name);
|