diff options
| author | David S. Miller <davem@davemloft.net> | 2012-08-24 18:54:37 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-08-24 18:54:37 -0400 |
| commit | e6acb384807406c1a6ad3ddc91191f7658e63b7a (patch) | |
| tree | 7906d1bb402ac30e4efaa1bc6451b1c7a4b6e768 /include/linux | |
| parent | 255e87657a84e21986e5d9070f3dee4aa8d1d531 (diff) | |
| parent | 898132ae76d1aeb52301f10e8795c34fbb54e853 (diff) | |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
This is an initial merge in of Eric Biederman's work to start adding
user namespace support to the networking.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/inet_diag.h | 1 | ||||
| -rw-r--r-- | include/linux/netlink.h | 1 | ||||
| -rw-r--r-- | include/linux/seq_file.h | 14 |
3 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h index f1362b5447fc..e788c186ed3a 100644 --- a/include/linux/inet_diag.h +++ b/include/linux/inet_diag.h | |||
| @@ -159,6 +159,7 @@ struct inet_diag_handler { | |||
| 159 | struct inet_connection_sock; | 159 | struct inet_connection_sock; |
| 160 | int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk, | 160 | int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk, |
| 161 | struct sk_buff *skb, struct inet_diag_req_v2 *req, | 161 | struct sk_buff *skb, struct inet_diag_req_v2 *req, |
| 162 | struct user_namespace *user_ns, | ||
| 162 | u32 pid, u32 seq, u16 nlmsg_flags, | 163 | u32 pid, u32 seq, u16 nlmsg_flags, |
| 163 | const struct nlmsghdr *unlh); | 164 | const struct nlmsghdr *unlh); |
| 164 | void inet_diag_dump_icsk(struct inet_hashinfo *h, struct sk_buff *skb, | 165 | void inet_diag_dump_icsk(struct inet_hashinfo *h, struct sk_buff *skb, |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index f74dd133788f..c9fdde2bc73f 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -165,6 +165,7 @@ struct netlink_skb_parms { | |||
| 165 | struct ucred creds; /* Skb credentials */ | 165 | struct ucred creds; /* Skb credentials */ |
| 166 | __u32 pid; | 166 | __u32 pid; |
| 167 | __u32 dst_group; | 167 | __u32 dst_group; |
| 168 | struct sock *ssk; | ||
| 168 | }; | 169 | }; |
| 169 | 170 | ||
| 170 | #define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb)) | 171 | #define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb)) |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 83c44eefe698..68a04a343cad 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
| @@ -13,6 +13,7 @@ struct file; | |||
| 13 | struct path; | 13 | struct path; |
| 14 | struct inode; | 14 | struct inode; |
| 15 | struct dentry; | 15 | struct dentry; |
| 16 | struct user_namespace; | ||
| 16 | 17 | ||
| 17 | struct seq_file { | 18 | struct seq_file { |
| 18 | char *buf; | 19 | char *buf; |
| @@ -25,6 +26,9 @@ struct seq_file { | |||
| 25 | struct mutex lock; | 26 | struct mutex lock; |
| 26 | const struct seq_operations *op; | 27 | const struct seq_operations *op; |
| 27 | int poll_event; | 28 | int poll_event; |
| 29 | #ifdef CONFIG_USER_NS | ||
| 30 | struct user_namespace *user_ns; | ||
| 31 | #endif | ||
| 28 | void *private; | 32 | void *private; |
| 29 | }; | 33 | }; |
| 30 | 34 | ||
| @@ -128,6 +132,16 @@ int seq_put_decimal_ull(struct seq_file *m, char delimiter, | |||
| 128 | int seq_put_decimal_ll(struct seq_file *m, char delimiter, | 132 | int seq_put_decimal_ll(struct seq_file *m, char delimiter, |
| 129 | long long num); | 133 | long long num); |
| 130 | 134 | ||
| 135 | static inline struct user_namespace *seq_user_ns(struct seq_file *seq) | ||
| 136 | { | ||
| 137 | #ifdef CONFIG_USER_NS | ||
| 138 | return seq->user_ns; | ||
| 139 | #else | ||
| 140 | extern struct user_namespace init_user_ns; | ||
| 141 | return &init_user_ns; | ||
| 142 | #endif | ||
| 143 | } | ||
| 144 | |||
| 131 | #define SEQ_START_TOKEN ((void *)1) | 145 | #define SEQ_START_TOKEN ((void *)1) |
| 132 | /* | 146 | /* |
| 133 | * Helpers for iteration over list_head-s in seq_files | 147 | * Helpers for iteration over list_head-s in seq_files |
