diff options
author | Huw Davies <huw@codeweavers.com> | 2016-06-27 15:06:15 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2016-06-27 15:06:15 -0400 |
commit | 2917f57b6bc15cc6787496ee5f2fdf17f0e9b7d3 (patch) | |
tree | cf6e68541ba82eb7c4b11a7ba563f423060d8b46 /include/net | |
parent | 0868383b822e4d8ebde980c7aac973a6aa81a3ec (diff) |
calipso: Allow the lsm to label the skbuff directly.
In some cases, the lsm needs to add the label to the skbuff directly.
A NF_INET_LOCAL_OUT IPv6 hook is added to selinux to match the IPv4
behaviour. This allows selinux to label the skbuffs that it requires.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netlabel.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/netlabel.h b/include/net/netlabel.h index a2408c30a7f7..e0e4ce8f22af 100644 --- a/include/net/netlabel.h +++ b/include/net/netlabel.h | |||
@@ -231,6 +231,10 @@ struct netlbl_lsm_secattr { | |||
231 | * @sock_delattr: remove the socket's attr | 231 | * @sock_delattr: remove the socket's attr |
232 | * @req_setattr: set the req socket's attr | 232 | * @req_setattr: set the req socket's attr |
233 | * @req_delattr: remove the req socket's attr | 233 | * @req_delattr: remove the req socket's attr |
234 | * @opt_getattr: retrieve attr from memory block | ||
235 | * @skbuff_optptr: find option in packet | ||
236 | * @skbuff_setattr: set the skbuff's attr | ||
237 | * @skbuff_delattr: remove the skbuff's attr | ||
234 | * | 238 | * |
235 | * Description: | 239 | * Description: |
236 | * This structure is filled out by the CALIPSO engine and passed | 240 | * This structure is filled out by the CALIPSO engine and passed |
@@ -258,6 +262,13 @@ struct netlbl_calipso_ops { | |||
258 | const struct calipso_doi *doi_def, | 262 | const struct calipso_doi *doi_def, |
259 | const struct netlbl_lsm_secattr *secattr); | 263 | const struct netlbl_lsm_secattr *secattr); |
260 | void (*req_delattr)(struct request_sock *req); | 264 | void (*req_delattr)(struct request_sock *req); |
265 | int (*opt_getattr)(const unsigned char *calipso, | ||
266 | struct netlbl_lsm_secattr *secattr); | ||
267 | unsigned char *(*skbuff_optptr)(const struct sk_buff *skb); | ||
268 | int (*skbuff_setattr)(struct sk_buff *skb, | ||
269 | const struct calipso_doi *doi_def, | ||
270 | const struct netlbl_lsm_secattr *secattr); | ||
271 | int (*skbuff_delattr)(struct sk_buff *skb); | ||
261 | }; | 272 | }; |
262 | 273 | ||
263 | /* | 274 | /* |