diff options
Diffstat (limited to 'security/selinux/exports.c')
-rw-r--r-- | security/selinux/exports.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/security/selinux/exports.c b/security/selinux/exports.c index 07ddce7bf374..7357cf247f60 100644 --- a/security/selinux/exports.c +++ b/security/selinux/exports.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/selinux.h> | 16 | #include <linux/selinux.h> |
17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
18 | #include <linux/ipc.h> | ||
18 | 19 | ||
19 | #include "security.h" | 20 | #include "security.h" |
20 | #include "objsec.h" | 21 | #include "objsec.h" |
@@ -50,3 +51,13 @@ void selinux_get_inode_sid(const struct inode *inode, u32 *sid) | |||
50 | *sid = 0; | 51 | *sid = 0; |
51 | } | 52 | } |
52 | 53 | ||
54 | void selinux_get_ipc_sid(const struct kern_ipc_perm *ipcp, u32 *sid) | ||
55 | { | ||
56 | if (selinux_enabled) { | ||
57 | struct ipc_security_struct *isec = ipcp->security; | ||
58 | *sid = isec->sid; | ||
59 | return; | ||
60 | } | ||
61 | *sid = 0; | ||
62 | } | ||
63 | |||