apparmor: Remove -W1 warnings
authorJohn Johansen <john.johansen@canonical.com>
Tue, 19 Feb 2013 00:00:34 +0000 (16:00 -0800)
committerJohn Johansen <john.johansen@canonical.com>
Sun, 28 Apr 2013 07:35:18 +0000 (00:35 -0700)
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
security/apparmor/domain.c
security/apparmor/lsm.c

index 7bc85c7f4573d1eaaf5d60a832514e1dedc8e2b0..7a78e814f0d4e7d339adf3ab1a5342f9de57f53a 100644 (file)
@@ -752,7 +752,6 @@ int aa_change_profile(const char *ns_name, const char *hname, bool onexec,
                      bool permtest)
 {
        const struct cred *cred;
-       struct aa_task_cxt *cxt;
        struct aa_profile *profile, *target = NULL;
        struct aa_namespace *ns = NULL;
        struct file_perms perms = {};
@@ -772,7 +771,6 @@ int aa_change_profile(const char *ns_name, const char *hname, bool onexec,
        }
 
        cred = get_current_cred();
-       cxt = cred->security;
        profile = aa_cred_profile(cred);
 
        /*
index b21830eced4185204d22d7d635fdb8741c1af700..0f61dadca9e6e4f122546ac16d800772ede2b15f 100644 (file)
@@ -469,7 +469,6 @@ static int apparmor_file_lock(struct file *file, unsigned int cmd)
 static int common_mmap(int op, struct file *file, unsigned long prot,
                       unsigned long flags)
 {
-       struct dentry *dentry;
        int mask = 0;
 
        if (!file || !file->f_security)
@@ -486,7 +485,6 @@ static int common_mmap(int op, struct file *file, unsigned long prot,
        if (prot & PROT_EXEC)
                mask |= AA_EXEC_MMAP;
 
-       dentry = file->f_path.dentry;
        return common_file_perm(op, file, mask);
 }
 
@@ -507,11 +505,9 @@ static int apparmor_getprocattr(struct task_struct *task, char *name,
                                char **value)
 {
        int error = -ENOENT;
-       struct aa_profile *profile;
        /* released below */
        const struct cred *cred = get_task_cred(task);
        struct aa_task_cxt *cxt = cred->security;
-       profile = aa_cred_profile(cred);
 
        if (strcmp(name, "current") == 0)
                error = aa_getprocattr(aa_newest_version(cxt->profile),