aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor
diff options
context:
space:
mode:
Diffstat (limited to 'security/apparmor')
-rw-r--r--security/apparmor/lsm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 68d50c54e431..97ce8fae49b3 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -136,16 +136,16 @@ static int apparmor_capget(struct task_struct *target, kernel_cap_t *effective,
136 return 0; 136 return 0;
137} 137}
138 138
139static int apparmor_capable(struct task_struct *task, const struct cred *cred, 139static int apparmor_capable(const struct cred *cred, struct user_namespace *ns,
140 struct user_namespace *ns, int cap, int audit) 140 int cap, int audit)
141{ 141{
142 struct aa_profile *profile; 142 struct aa_profile *profile;
143 /* cap_capable returns 0 on success, else -EPERM */ 143 /* cap_capable returns 0 on success, else -EPERM */
144 int error = cap_capable(task, cred, ns, cap, audit); 144 int error = cap_capable(cred, ns, cap, audit);
145 if (!error) { 145 if (!error) {
146 profile = aa_cred_profile(cred); 146 profile = aa_cred_profile(cred);
147 if (!unconfined(profile)) 147 if (!unconfined(profile))
148 error = aa_capable(task, profile, cap, audit); 148 error = aa_capable(current, profile, cap, audit);
149 } 149 }
150 return error; 150 return error;
151} 151}