mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 12:44:11 +08:00
selinux: delete selinux_xfrm_policy_lookup() useless argument
seliunx_xfrm_policy_lookup() is hooks of security_xfrm_policy_lookup(). The dir argument is uselss in security_xfrm_policy_lookup(). So remove the dir argument from selinux_xfrm_policy_lookup() and security_xfrm_policy_lookup(). Signed-off-by: Zhongjun Tan <tanzhongjun@yulong.com> [PM: reformat the subject line] Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
e1cce3a3cb
commit
8a922805fb
@ -358,8 +358,7 @@ LSM_HOOK(int, 0, xfrm_state_alloc_acquire, struct xfrm_state *x,
|
||||
struct xfrm_sec_ctx *polsec, u32 secid)
|
||||
LSM_HOOK(void, LSM_RET_VOID, xfrm_state_free_security, struct xfrm_state *x)
|
||||
LSM_HOOK(int, 0, xfrm_state_delete_security, struct xfrm_state *x)
|
||||
LSM_HOOK(int, 0, xfrm_policy_lookup, struct xfrm_sec_ctx *ctx, u32 fl_secid,
|
||||
u8 dir)
|
||||
LSM_HOOK(int, 0, xfrm_policy_lookup, struct xfrm_sec_ctx *ctx, u32 fl_secid)
|
||||
LSM_HOOK(int, 1, xfrm_state_pol_flow_match, struct xfrm_state *x,
|
||||
struct xfrm_policy *xp, const struct flowi_common *flic)
|
||||
LSM_HOOK(int, 0, xfrm_decode_session, struct sk_buff *skb, u32 *secid,
|
||||
|
@ -1681,7 +1681,7 @@ int security_xfrm_state_alloc_acquire(struct xfrm_state *x,
|
||||
struct xfrm_sec_ctx *polsec, u32 secid);
|
||||
int security_xfrm_state_delete(struct xfrm_state *x);
|
||||
void security_xfrm_state_free(struct xfrm_state *x);
|
||||
int security_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid, u8 dir);
|
||||
int security_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid);
|
||||
int security_xfrm_state_pol_flow_match(struct xfrm_state *x,
|
||||
struct xfrm_policy *xp,
|
||||
const struct flowi_common *flic);
|
||||
@ -1732,7 +1732,7 @@ static inline int security_xfrm_state_delete(struct xfrm_state *x)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int security_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid, u8 dir)
|
||||
static inline int security_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -1902,8 +1902,7 @@ static int xfrm_policy_match(const struct xfrm_policy *pol,
|
||||
|
||||
match = xfrm_selector_match(sel, fl, family);
|
||||
if (match)
|
||||
ret = security_xfrm_policy_lookup(pol->security, fl->flowi_secid,
|
||||
dir);
|
||||
ret = security_xfrm_policy_lookup(pol->security, fl->flowi_secid);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -2181,8 +2180,7 @@ static struct xfrm_policy *xfrm_sk_policy_lookup(const struct sock *sk, int dir,
|
||||
goto out;
|
||||
}
|
||||
err = security_xfrm_policy_lookup(pol->security,
|
||||
fl->flowi_secid,
|
||||
dir);
|
||||
fl->flowi_secid);
|
||||
if (!err) {
|
||||
if (!xfrm_pol_hold_rcu(pol))
|
||||
goto again;
|
||||
|
@ -2466,9 +2466,9 @@ void security_xfrm_state_free(struct xfrm_state *x)
|
||||
call_void_hook(xfrm_state_free_security, x);
|
||||
}
|
||||
|
||||
int security_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid, u8 dir)
|
||||
int security_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid)
|
||||
{
|
||||
return call_int_hook(xfrm_policy_lookup, 0, ctx, fl_secid, dir);
|
||||
return call_int_hook(xfrm_policy_lookup, 0, ctx, fl_secid);
|
||||
}
|
||||
|
||||
int security_xfrm_state_pol_flow_match(struct xfrm_state *x,
|
||||
|
@ -23,7 +23,7 @@ int selinux_xfrm_state_alloc_acquire(struct xfrm_state *x,
|
||||
struct xfrm_sec_ctx *polsec, u32 secid);
|
||||
void selinux_xfrm_state_free(struct xfrm_state *x);
|
||||
int selinux_xfrm_state_delete(struct xfrm_state *x);
|
||||
int selinux_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid, u8 dir);
|
||||
int selinux_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid);
|
||||
int selinux_xfrm_state_pol_flow_match(struct xfrm_state *x,
|
||||
struct xfrm_policy *xp,
|
||||
const struct flowi_common *flic);
|
||||
|
@ -150,7 +150,7 @@ static int selinux_xfrm_delete(struct xfrm_sec_ctx *ctx)
|
||||
* LSM hook implementation that authorizes that a flow can use a xfrm policy
|
||||
* rule.
|
||||
*/
|
||||
int selinux_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid, u8 dir)
|
||||
int selinux_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid)
|
||||
{
|
||||
int rc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user