浏览代码

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>
James Morris 15 年之前
父节点
当前提交
77c80e6b2f
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      security/apparmor/domain.c
  2. 1 1
      security/apparmor/ipc.c

+ 1 - 1
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;
 

+ 1 - 1
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);