|
@@ -10,6 +10,7 @@
|
|
#include <linux/workqueue.h>
|
|
#include <linux/workqueue.h>
|
|
#include <linux/list.h>
|
|
#include <linux/list.h>
|
|
#include <linux/sysctl.h>
|
|
#include <linux/sysctl.h>
|
|
|
|
+#include <linux/uidgid.h>
|
|
|
|
|
|
#include <net/flow.h>
|
|
#include <net/flow.h>
|
|
#include <net/netns/core.h>
|
|
#include <net/netns/core.h>
|
|
@@ -170,6 +171,8 @@ extern struct net init_net;
|
|
struct net *copy_net_ns(unsigned long flags, struct user_namespace *user_ns,
|
|
struct net *copy_net_ns(unsigned long flags, struct user_namespace *user_ns,
|
|
struct net *old_net);
|
|
struct net *old_net);
|
|
|
|
|
|
|
|
+void net_ns_get_ownership(const struct net *net, kuid_t *uid, kgid_t *gid);
|
|
|
|
+
|
|
void net_ns_barrier(void);
|
|
void net_ns_barrier(void);
|
|
#else /* CONFIG_NET_NS */
|
|
#else /* CONFIG_NET_NS */
|
|
#include <linux/sched.h>
|
|
#include <linux/sched.h>
|
|
@@ -182,6 +185,13 @@ static inline struct net *copy_net_ns(unsigned long flags,
|
|
return old_net;
|
|
return old_net;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline void net_ns_get_ownership(const struct net *net,
|
|
|
|
+ kuid_t *uid, kgid_t *gid)
|
|
|
|
+{
|
|
|
|
+ *uid = GLOBAL_ROOT_UID;
|
|
|
|
+ *gid = GLOBAL_ROOT_GID;
|
|
|
|
+}
|
|
|
|
+
|
|
static inline void net_ns_barrier(void) {}
|
|
static inline void net_ns_barrier(void) {}
|
|
#endif /* CONFIG_NET_NS */
|
|
#endif /* CONFIG_NET_NS */
|
|
|
|
|