Merge branch 'master' of git://git.infradead.org/users/eparis/selinux into next
[firefly-linux-kernel-4.4.55.git] / include / linux / security.h
index d11ac43ecc49b2ea1e0cd77b4b8e46cc855a6bbb..84a202ac3de9bb5f23edd686f7efdae9b7a67edf 100644 (file)
@@ -1665,7 +1665,7 @@ int security_capset(struct cred *new, const struct cred *old,
                    const kernel_cap_t *effective,
                    const kernel_cap_t *inheritable,
                    const kernel_cap_t *permitted);
-int security_capable(int cap);
+int security_capable(const struct cred *cred, int cap);
 int security_real_capable(struct task_struct *tsk, int cap);
 int security_real_capable_noaudit(struct task_struct *tsk, int cap);
 int security_quotactl(int cmds, int type, int id, struct super_block *sb);
@@ -1860,9 +1860,9 @@ static inline int security_capset(struct cred *new,
        return cap_capset(new, old, effective, inheritable, permitted);
 }
 
-static inline int security_capable(int cap)
+static inline int security_capable(const struct cred *cred, int cap)
 {
-       return cap_capable(current, current_cred(), cap, SECURITY_CAP_AUDIT);
+       return cap_capable(current, cred, cap, SECURITY_CAP_AUDIT);
 }
 
 static inline int security_real_capable(struct task_struct *tsk, int cap)