Commit 04266236 authored by John Johansen's avatar John Johansen

apparmor: Remove -W1 warnings

Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Acked-By: default avatarSteve Beattie <sbeattie@ubuntu.com>
parent 17322cc3
...@@ -752,7 +752,6 @@ int aa_change_profile(const char *ns_name, const char *hname, bool onexec, ...@@ -752,7 +752,6 @@ int aa_change_profile(const char *ns_name, const char *hname, bool onexec,
bool permtest) bool permtest)
{ {
const struct cred *cred; const struct cred *cred;
struct aa_task_cxt *cxt;
struct aa_profile *profile, *target = NULL; struct aa_profile *profile, *target = NULL;
struct aa_namespace *ns = NULL; struct aa_namespace *ns = NULL;
struct file_perms perms = {}; struct file_perms perms = {};
...@@ -772,7 +771,6 @@ int aa_change_profile(const char *ns_name, const char *hname, bool onexec, ...@@ -772,7 +771,6 @@ int aa_change_profile(const char *ns_name, const char *hname, bool onexec,
} }
cred = get_current_cred(); cred = get_current_cred();
cxt = cred->security;
profile = aa_cred_profile(cred); profile = aa_cred_profile(cred);
/* /*
......
...@@ -469,7 +469,6 @@ static int apparmor_file_lock(struct file *file, unsigned int cmd) ...@@ -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, static int common_mmap(int op, struct file *file, unsigned long prot,
unsigned long flags) unsigned long flags)
{ {
struct dentry *dentry;
int mask = 0; int mask = 0;
if (!file || !file->f_security) if (!file || !file->f_security)
...@@ -486,7 +485,6 @@ static int common_mmap(int op, struct file *file, unsigned long prot, ...@@ -486,7 +485,6 @@ static int common_mmap(int op, struct file *file, unsigned long prot,
if (prot & PROT_EXEC) if (prot & PROT_EXEC)
mask |= AA_EXEC_MMAP; mask |= AA_EXEC_MMAP;
dentry = file->f_path.dentry;
return common_file_perm(op, file, mask); return common_file_perm(op, file, mask);
} }
...@@ -507,11 +505,9 @@ static int apparmor_getprocattr(struct task_struct *task, char *name, ...@@ -507,11 +505,9 @@ static int apparmor_getprocattr(struct task_struct *task, char *name,
char **value) char **value)
{ {
int error = -ENOENT; int error = -ENOENT;
struct aa_profile *profile;
/* released below */ /* released below */
const struct cred *cred = get_task_cred(task); const struct cred *cred = get_task_cred(task);
struct aa_task_cxt *cxt = cred->security; struct aa_task_cxt *cxt = cred->security;
profile = aa_cred_profile(cred);
if (strcmp(name, "current") == 0) if (strcmp(name, "current") == 0)
error = aa_getprocattr(aa_newest_version(cxt->profile), error = aa_getprocattr(aa_newest_version(cxt->profile),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment