git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
USB: ftdi_sio: add vendor/project id for JETI specbos 1201 spectrometer
[safe/jmp/linux-2.6]
/
security
/
selinux
/
xfrm.c
diff --git
a/security/selinux/xfrm.c
b/security/selinux/xfrm.c
index
3b8b994
..
c0eb720
100644
(file)
--- a/
security/selinux/xfrm.c
+++ b/
security/selinux/xfrm.c
@@
-180,8
+180,7
@@
int selinux_xfrm_decode_session(struct sk_buff *skb, u32 *sid, int ckall)
if (!ckall)
break;
if (!ckall)
break;
- }
- else if (*sid != ctx->ctx_sid)
+ } else if (*sid != ctx->ctx_sid)
return -EINVAL;
}
}
return -EINVAL;
}
}
@@
-198,7
+197,7
@@
static int selinux_xfrm_sec_ctx_alloc(struct xfrm_sec_ctx **ctxp,
struct xfrm_user_sec_ctx *uctx, u32 sid)
{
int rc = 0;
struct xfrm_user_sec_ctx *uctx, u32 sid)
{
int rc = 0;
-
struct task_security_struct *tsec = current->security
;
+
const struct task_security_struct *tsec = current_security()
;
struct xfrm_sec_ctx *ctx = NULL;
char *ctx_str = NULL;
u32 str_len;
struct xfrm_sec_ctx *ctx = NULL;
char *ctx_str = NULL;
u32 str_len;
@@
-326,8
+325,7
@@
int selinux_xfrm_policy_clone(struct xfrm_sec_ctx *old_ctx,
*/
void selinux_xfrm_policy_free(struct xfrm_sec_ctx *ctx)
{
*/
void selinux_xfrm_policy_free(struct xfrm_sec_ctx *ctx)
{
- if (ctx)
- kfree(ctx);
+ kfree(ctx);
}
/*
}
/*
@@
-335,7
+333,7
@@
void selinux_xfrm_policy_free(struct xfrm_sec_ctx *ctx)
*/
int selinux_xfrm_policy_delete(struct xfrm_sec_ctx *ctx)
{
*/
int selinux_xfrm_policy_delete(struct xfrm_sec_ctx *ctx)
{
-
struct task_security_struct *tsec = current->security
;
+
const struct task_security_struct *tsec = current_security()
;
int rc = 0;
if (ctx) {
int rc = 0;
if (ctx) {
@@
-372,8
+370,7
@@
int selinux_xfrm_state_alloc(struct xfrm_state *x, struct xfrm_user_sec_ctx *uct
void selinux_xfrm_state_free(struct xfrm_state *x)
{
struct xfrm_sec_ctx *ctx = x->security;
void selinux_xfrm_state_free(struct xfrm_state *x)
{
struct xfrm_sec_ctx *ctx = x->security;
- if (ctx)
- kfree(ctx);
+ kfree(ctx);
}
/*
}
/*
@@
-381,7
+378,7
@@
void selinux_xfrm_state_free(struct xfrm_state *x)
*/
int selinux_xfrm_state_delete(struct xfrm_state *x)
{
*/
int selinux_xfrm_state_delete(struct xfrm_state *x)
{
-
struct task_security_struct *tsec = current->security
;
+
const struct task_security_struct *tsec = current_security()
;
struct xfrm_sec_ctx *ctx = x->security;
int rc = 0;
struct xfrm_sec_ctx *ctx = x->security;
int rc = 0;