aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2010-08-02 15:49:00 +1000
committerJames Morris <jmorris@namei.org>2010-08-02 15:49:00 +1000
commit77c80e6b2fd049848bfd1bdab67899ad3ac407a7 (patch)
tree672ccbe5316698e0ef4dae46ba0029fb234989bf /security
parent6371dcd36f649d9d07823f31400618155a20dde1 (diff)
AppArmor: fix build warnings for non-const use of get_task_cred
Fix build warnings for non-const use of get_task_cred. Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/domain.c2
-rw-r--r--security/apparmor/ipc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 08bbe6397a7..c825c6e0b63 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -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;
diff --git a/security/apparmor/ipc.c b/security/apparmor/ipc.c
index 9013a78a166..649fad88869 100644
--- a/security/apparmor/ipc.c
+++ b/security/apparmor/ipc.c
@@ -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);