Skip to content

Commit

Permalink
Smack: Ptrace access check mode
Browse files Browse the repository at this point in the history
When the ptrace security hooks were split the addition of
a mode parameter was not taken advantage of in the Smack
ptrace access check. This changes the access check from
always looking for read and write access to using the
passed mode. This will make use of /proc much happier.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
  • Loading branch information
Casey Schaufler committed Oct 28, 2013
1 parent c0ab6e5 commit b5dfd80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/smack/smack_lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static int smack_ptrace_access_check(struct task_struct *ctp, unsigned int mode)
smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK);
smk_ad_setfield_u_tsk(&ad, ctp);

rc = smk_curacc(skp->smk_known, MAY_READWRITE, &ad);
rc = smk_curacc(skp->smk_known, mode, &ad);
return rc;
}

Expand Down

0 comments on commit b5dfd80

Please sign in to comment.