diff options
author | James Morris <james.l.morris@oracle.com> | 2017-02-10 10:28:49 +1100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-02-10 10:28:49 +1100 |
commit | a2a15479d617ebbab67c60b4eed02524536af780 (patch) | |
tree | 64c4a5bbf434b003f02f56edda845e89fd539a7a /security/selinux/include/objsec.h | |
parent | e2241be62deabe09d7c681326fcb0bc707082147 (diff) | |
parent | 1ea0ce40690dff38935538e8dab7b12683ded0d3 (diff) | |
download | op-kernel-dev-a2a15479d617ebbab67c60b4eed02524536af780.zip op-kernel-dev-a2a15479d617ebbab67c60b4eed02524536af780.tar.gz |
Merge branch 'stable-4.11' of git://git.infradead.org/users/pcmoore/selinux into next
Diffstat (limited to 'security/selinux/include/objsec.h')
-rw-r--r-- | security/selinux/include/objsec.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/security/selinux/include/objsec.h b/security/selinux/include/objsec.h index e8dab0f..c03cdcd 100644 --- a/security/selinux/include/objsec.h +++ b/security/selinux/include/objsec.h @@ -37,6 +37,16 @@ struct task_security_struct { u32 sockcreate_sid; /* fscreate SID */ }; +/* + * get the subjective security ID of the current task + */ +static inline u32 current_sid(void) +{ + const struct task_security_struct *tsec = current_security(); + + return tsec->sid; +} + enum label_initialized { LABEL_INVALID, /* invalid or not initialized */ LABEL_INITIALIZED, /* initialized */ |