aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss
diff options
context:
space:
mode:
authorPaul Moore <paul.moore@hp.com>2007-03-01 14:35:22 -0500
committerJames Morris <jmorris@namei.org>2007-04-26 01:35:56 -0400
commit4f6a993f96a256e83b9be7612f958c7bc4ca9f00 (patch)
tree385e5ce4423583b65780d20fce075cd936fe1449 /security/selinux/ss
parent588a31577f86a5cd8b0bcde6026e4e6dcac8c383 (diff)
SELinux: move security_skb_extlbl_sid() out of the security server
As suggested, move the security_skb_extlbl_sid() function out of the security server and into the SELinux hooks file. Signed-off-by: Paul Moore <paul.moore@hp.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/ss')
-rw-r--r--security/selinux/ss/services.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index f4129f589313..8ee4aaef1094 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -39,7 +39,6 @@
39#include <linux/sched.h> 39#include <linux/sched.h>
40#include <linux/audit.h> 40#include <linux/audit.h>
41#include <linux/mutex.h> 41#include <linux/mutex.h>
42#include <net/sock.h>
43#include <net/netlabel.h> 42#include <net/netlabel.h>
44 43
45#include "flask.h" 44#include "flask.h"
@@ -2198,32 +2197,6 @@ void selinux_audit_set_callback(int (*callback)(void))
2198 aurule_callback = callback; 2197 aurule_callback = callback;
2199} 2198}
2200 2199
2201/**
2202 * security_skb_extlbl_sid - Determine the external label of a packet
2203 * @skb: the packet
2204 * @base_sid: the SELinux SID to use as a context for MLS only external labels
2205 * @sid: the packet's SID
2206 *
2207 * Description:
2208 * Check the various different forms of external packet labeling and determine
2209 * the external SID for the packet.
2210 *
2211 */
2212void security_skb_extlbl_sid(struct sk_buff *skb, u32 base_sid, u32 *sid)
2213{
2214 u32 xfrm_sid;
2215 u32 nlbl_sid;
2216
2217 selinux_skb_xfrm_sid(skb, &xfrm_sid);
2218 if (selinux_netlbl_skbuff_getsid(skb,
2219 (xfrm_sid == SECSID_NULL ?
2220 base_sid : xfrm_sid),
2221 &nlbl_sid) != 0)
2222 nlbl_sid = SECSID_NULL;
2223
2224 *sid = (nlbl_sid == SECSID_NULL ? xfrm_sid : nlbl_sid);
2225}
2226
2227#ifdef CONFIG_NETLABEL 2200#ifdef CONFIG_NETLABEL
2228/* 2201/*
2229 * NetLabel cache structure 2202 * NetLabel cache structure