summaryrefslogtreecommitdiffstats
path: root/include/linux/security.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-06 18:39:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-06 18:39:26 -0400
commit9eda2d2dca830f0f8923b1f377d0fb70f576af1d (patch)
tree5bdc06d14182e67ebdf20e5543de2a407563662f /include/linux/security.h
parent6ad11bdd57ad31182850a54235f0e947cbfd5ad0 (diff)
parent6b6bc6205d98796361962ee282a063f18ba8dc57 (diff)
Merge tag 'selinux-pr-20180403' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux
Pull SELinux updates from Paul Moore: "A bigger than usual pull request for SELinux, 13 patches (lucky!) along with a scary looking diffstat. Although if you look a bit closer, excluding the usual minor tweaks/fixes, there are really only two significant changes in this pull request: the addition of proper SELinux access controls for SCTP and the encapsulation of a lot of internal SELinux state. The SCTP changes are the result of a multi-month effort (maybe even a year or longer?) between the SELinux folks and the SCTP folks to add proper SELinux controls. A special thanks go to Richard for seeing this through and keeping the effort moving forward. The state encapsulation work is a bit of janitorial work that came out of some early work on SELinux namespacing. The question of namespacing is still an open one, but I believe there is some real value in the encapsulation work so we've split that out and are now sending that up to you" * tag 'selinux-pr-20180403' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: wrap AVC state selinux: wrap selinuxfs state selinux: fix handling of uninitialized selinux state in get_bools/classes selinux: Update SELinux SCTP documentation selinux: Fix ltp test connect-syscall failure selinux: rename the {is,set}_enforcing() functions selinux: wrap global selinux state selinux: fix typo in selinux_netlbl_sctp_sk_clone declaration selinux: Add SCTP support sctp: Add LSM hooks sctp: Add ip option support security: Add support for SCTP security hooks netlabel: If PF_INET6, check sk_buff ip header version
Diffstat (limited to 'include/linux/security.h')
-rw-r--r--include/linux/security.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index 128e1e4a5346..17ffd1ef6074 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -112,6 +112,7 @@ struct xfrm_policy;
112struct xfrm_state; 112struct xfrm_state;
113struct xfrm_user_sec_ctx; 113struct xfrm_user_sec_ctx;
114struct seq_file; 114struct seq_file;
115struct sctp_endpoint;
115 116
116#ifdef CONFIG_MMU 117#ifdef CONFIG_MMU
117extern unsigned long mmap_min_addr; 118extern unsigned long mmap_min_addr;
@@ -1226,6 +1227,11 @@ int security_tun_dev_create(void);
1226int security_tun_dev_attach_queue(void *security); 1227int security_tun_dev_attach_queue(void *security);
1227int security_tun_dev_attach(struct sock *sk, void *security); 1228int security_tun_dev_attach(struct sock *sk, void *security);
1228int security_tun_dev_open(void *security); 1229int security_tun_dev_open(void *security);
1230int security_sctp_assoc_request(struct sctp_endpoint *ep, struct sk_buff *skb);
1231int security_sctp_bind_connect(struct sock *sk, int optname,
1232 struct sockaddr *address, int addrlen);
1233void security_sctp_sk_clone(struct sctp_endpoint *ep, struct sock *sk,
1234 struct sock *newsk);
1229 1235
1230#else /* CONFIG_SECURITY_NETWORK */ 1236#else /* CONFIG_SECURITY_NETWORK */
1231static inline int security_unix_stream_connect(struct sock *sock, 1237static inline int security_unix_stream_connect(struct sock *sock,
@@ -1418,6 +1424,25 @@ static inline int security_tun_dev_open(void *security)
1418{ 1424{
1419 return 0; 1425 return 0;
1420} 1426}
1427
1428static inline int security_sctp_assoc_request(struct sctp_endpoint *ep,
1429 struct sk_buff *skb)
1430{
1431 return 0;
1432}
1433
1434static inline int security_sctp_bind_connect(struct sock *sk, int optname,
1435 struct sockaddr *address,
1436 int addrlen)
1437{
1438 return 0;
1439}
1440
1441static inline void security_sctp_sk_clone(struct sctp_endpoint *ep,
1442 struct sock *sk,
1443 struct sock *newsk)
1444{
1445}
1421#endif /* CONFIG_SECURITY_NETWORK */ 1446#endif /* CONFIG_SECURITY_NETWORK */
1422 1447
1423#ifdef CONFIG_SECURITY_INFINIBAND 1448#ifdef CONFIG_SECURITY_INFINIBAND