Skip to content

Commit

Permalink
AppArmor: fix build warnings for non-const use of get_task_cred
Browse files Browse the repository at this point in the history
Fix build warnings for non-const use of get_task_cred.

Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
James Morris committed Aug 2, 2010
1 parent 6371dcd commit 77c80e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion security/apparmor/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static int may_change_ptraced_domain(struct task_struct *task,
struct aa_profile *to_profile)
{
struct task_struct *tracer;
struct cred *cred = NULL;
const struct cred *cred = NULL;
struct aa_profile *tracerp = NULL;
int error = 0;

Expand Down
2 changes: 1 addition & 1 deletion security/apparmor/ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int aa_ptrace(struct task_struct *tracer, struct task_struct *tracee,

if (!unconfined(tracer_p)) {
/* lcred released below */
struct cred *lcred = get_task_cred(tracee);
const struct cred *lcred = get_task_cred(tracee);
struct aa_profile *tracee_p = aa_cred_profile(lcred);

error = aa_may_ptrace(tracer, tracer_p, tracee_p, mode);
Expand Down

0 comments on commit 77c80e6

Please sign in to comment.