diff options
author | John Johansen <john.johansen@canonical.com> | 2013-02-18 19:00:34 -0500 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2013-04-28 03:35:18 -0400 |
commit | 04266236b1c3030bb7f75472ac85a8b78fcfb284 (patch) | |
tree | 104b79899c3169a5767744d07eaf310a8b75044c /security | |
parent | 17322cc3f9ba578f20b5c09fb1630bd234040008 (diff) |
apparmor: Remove -W1 warnings
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/domain.c | 2 | ||||
-rw-r--r-- | security/apparmor/lsm.c | 4 |
2 files changed, 0 insertions, 6 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c index 7bc85c7f4573..7a78e814f0d4 100644 --- a/security/apparmor/domain.c +++ b/security/apparmor/domain.c | |||
@@ -752,7 +752,6 @@ int aa_change_profile(const char *ns_name, const char *hname, bool onexec, | |||
752 | bool permtest) | 752 | bool permtest) |
753 | { | 753 | { |
754 | const struct cred *cred; | 754 | const struct cred *cred; |
755 | struct aa_task_cxt *cxt; | ||
756 | struct aa_profile *profile, *target = NULL; | 755 | struct aa_profile *profile, *target = NULL; |
757 | struct aa_namespace *ns = NULL; | 756 | struct aa_namespace *ns = NULL; |
758 | struct file_perms perms = {}; | 757 | struct file_perms perms = {}; |
@@ -772,7 +771,6 @@ int aa_change_profile(const char *ns_name, const char *hname, bool onexec, | |||
772 | } | 771 | } |
773 | 772 | ||
774 | cred = get_current_cred(); | 773 | cred = get_current_cred(); |
775 | cxt = cred->security; | ||
776 | profile = aa_cred_profile(cred); | 774 | profile = aa_cred_profile(cred); |
777 | 775 | ||
778 | /* | 776 | /* |
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index b21830eced41..0f61dadca9e6 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c | |||
@@ -469,7 +469,6 @@ static int apparmor_file_lock(struct file *file, unsigned int cmd) | |||
469 | static int common_mmap(int op, struct file *file, unsigned long prot, | 469 | static int common_mmap(int op, struct file *file, unsigned long prot, |
470 | unsigned long flags) | 470 | unsigned long flags) |
471 | { | 471 | { |
472 | struct dentry *dentry; | ||
473 | int mask = 0; | 472 | int mask = 0; |
474 | 473 | ||
475 | if (!file || !file->f_security) | 474 | if (!file || !file->f_security) |
@@ -486,7 +485,6 @@ static int common_mmap(int op, struct file *file, unsigned long prot, | |||
486 | if (prot & PROT_EXEC) | 485 | if (prot & PROT_EXEC) |
487 | mask |= AA_EXEC_MMAP; | 486 | mask |= AA_EXEC_MMAP; |
488 | 487 | ||
489 | dentry = file->f_path.dentry; | ||
490 | return common_file_perm(op, file, mask); | 488 | return common_file_perm(op, file, mask); |
491 | } | 489 | } |
492 | 490 | ||
@@ -507,11 +505,9 @@ static int apparmor_getprocattr(struct task_struct *task, char *name, | |||
507 | char **value) | 505 | char **value) |
508 | { | 506 | { |
509 | int error = -ENOENT; | 507 | int error = -ENOENT; |
510 | struct aa_profile *profile; | ||
511 | /* released below */ | 508 | /* released below */ |
512 | const struct cred *cred = get_task_cred(task); | 509 | const struct cred *cred = get_task_cred(task); |
513 | struct aa_task_cxt *cxt = cred->security; | 510 | struct aa_task_cxt *cxt = cred->security; |
514 | profile = aa_cred_profile(cred); | ||
515 | 511 | ||
516 | if (strcmp(name, "current") == 0) | 512 | if (strcmp(name, "current") == 0) |
517 | error = aa_getprocattr(aa_newest_version(cxt->profile), | 513 | error = aa_getprocattr(aa_newest_version(cxt->profile), |