AppArmor: fix build warnings for non-const use of get_task_cred
authorJames Morris <jmorris@namei.org>
Mon, 2 Aug 2010 05:49:00 +0000 (15:49 +1000)
committerJames Morris <jmorris@namei.org>
Mon, 2 Aug 2010 05:49:00 +0000 (15:49 +1000)
Fix build warnings for non-const use of get_task_cred.

Signed-off-by: James Morris <jmorris@namei.org>
security/apparmor/domain.c
security/apparmor/ipc.c

index 08bbe6397a7f5c6ad11eb2600f3f0a28a18cb5eb..c825c6e0b636ee985283d3d4a077deaa24343808 100644 (file)
@@ -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;
 
index 9013a78a1663214cc6e81b54d1e91b5c01fa1341..649fad88869b8a1dd4f2fe179006ddcdd1544923 100644 (file)
@@ -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);