aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/xfrm.c
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2013-07-23 17:38:39 -0400
committerEric Paris <eparis@redhat.com>2013-07-25 13:01:58 -0400
commit4baabeec2a061fe771f9fcc01c61204a2ee2f608 (patch)
tree813a33c886e2fe0504c12c2f5b04b415c5c239f5 /security/selinux/xfrm.c
parenteef9b41622f2f09e824fb4e7356b42bddada6623 (diff)
selinux: cleanup some comment and whitespace issues in the XFRM code
Signed-off-by: Paul Moore <pmoore@redhat.com> Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'security/selinux/xfrm.c')
-rw-r--r--security/selinux/xfrm.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c
index 1f6c6e619e98..00801cef1dd9 100644
--- a/security/selinux/xfrm.c
+++ b/security/selinux/xfrm.c
@@ -56,7 +56,7 @@
56atomic_t selinux_xfrm_refcount = ATOMIC_INIT(0); 56atomic_t selinux_xfrm_refcount = ATOMIC_INIT(0);
57 57
58/* 58/*
59 * Returns true if an LSM/SELinux context 59 * Returns true if the context is an LSM/SELinux context.
60 */ 60 */
61static inline int selinux_authorizable_ctx(struct xfrm_sec_ctx *ctx) 61static inline int selinux_authorizable_ctx(struct xfrm_sec_ctx *ctx)
62{ 62{
@@ -66,7 +66,7 @@ static inline int selinux_authorizable_ctx(struct xfrm_sec_ctx *ctx)
66} 66}
67 67
68/* 68/*
69 * Returns true if the xfrm contains a security blob for SELinux 69 * Returns true if the xfrm contains a security blob for SELinux.
70 */ 70 */
71static inline int selinux_authorizable_xfrm(struct xfrm_state *x) 71static inline int selinux_authorizable_xfrm(struct xfrm_state *x)
72{ 72{
@@ -149,8 +149,8 @@ static int selinux_xfrm_delete(struct xfrm_sec_ctx *ctx)
149} 149}
150 150
151/* 151/*
152 * LSM hook implementation that authorizes that a flow can use 152 * LSM hook implementation that authorizes that a flow can use a xfrm policy
153 * a xfrm policy rule. 153 * rule.
154 */ 154 */
155int selinux_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid, u8 dir) 155int selinux_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid, u8 dir)
156{ 156{
@@ -213,7 +213,6 @@ int selinux_xfrm_state_pol_flow_match(struct xfrm_state *x,
213 * LSM hook implementation that checks and/or returns the xfrm sid for the 213 * LSM hook implementation that checks and/or returns the xfrm sid for the
214 * incoming packet. 214 * incoming packet.
215 */ 215 */
216
217int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall) 216int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall)
218{ 217{
219 struct sec_path *sp; 218 struct sec_path *sp;
@@ -248,8 +247,7 @@ int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall)
248} 247}
249 248
250/* 249/*
251 * LSM hook implementation that allocs and transfers uctx spec to 250 * LSM hook implementation that allocs and transfers uctx spec to xfrm_policy.
252 * xfrm_policy.
253 */ 251 */
254int selinux_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, 252int selinux_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp,
255 struct xfrm_user_sec_ctx *uctx) 253 struct xfrm_user_sec_ctx *uctx)
@@ -257,10 +255,9 @@ int selinux_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp,
257 return selinux_xfrm_alloc_user(ctxp, uctx); 255 return selinux_xfrm_alloc_user(ctxp, uctx);
258} 256}
259 257
260
261/* 258/*
262 * LSM hook implementation that copies security data structure from old to 259 * LSM hook implementation that copies security data structure from old to new
263 * new for policy cloning. 260 * for policy cloning.
264 */ 261 */
265int selinux_xfrm_policy_clone(struct xfrm_sec_ctx *old_ctx, 262int selinux_xfrm_policy_clone(struct xfrm_sec_ctx *old_ctx,
266 struct xfrm_sec_ctx **new_ctxp) 263 struct xfrm_sec_ctx **new_ctxp)
@@ -352,9 +349,9 @@ void selinux_xfrm_state_free(struct xfrm_state *x)
352 selinux_xfrm_free(x->security); 349 selinux_xfrm_free(x->security);
353} 350}
354 351
355 /* 352/*
356 * LSM hook implementation that authorizes deletion of labeled SAs. 353 * LSM hook implementation that authorizes deletion of labeled SAs.
357 */ 354 */
358int selinux_xfrm_state_delete(struct xfrm_state *x) 355int selinux_xfrm_state_delete(struct xfrm_state *x)
359{ 356{
360 return selinux_xfrm_delete(x->security); 357 return selinux_xfrm_delete(x->security);