X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=security%2Fselinux%2Fexports.c;h=c73aeaa008e81681cdc141dd3fb9b545cf715808;hb=f0787f62df516df6975d4325795ed02c495f3728;hp=64af2d3409ef5e24945ac65032eac831d05eae25;hpb=9a64388d83f6ef08dfff405a9d122e3dbcb6bf38;p=~andy%2Flinux diff --git a/security/selinux/exports.c b/security/selinux/exports.c index 64af2d3409e..c73aeaa008e 100644 --- a/security/selinux/exports.c +++ b/security/selinux/exports.c @@ -39,9 +39,13 @@ EXPORT_SYMBOL_GPL(selinux_string_to_sid); int selinux_secmark_relabel_packet_permission(u32 sid) { if (selinux_enabled) { - struct task_security_struct *tsec = current->security; + const struct task_security_struct *__tsec; + u32 tsid; - return avc_has_perm(tsec->sid, sid, SECCLASS_PACKET, + __tsec = current_security(); + tsid = __tsec->sid; + + return avc_has_perm(tsid, sid, SECCLASS_PACKET, PACKET__RELABELTO, NULL); } return 0;