Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[sfrench/cifs-2.6.git] / security / smack / smack_access.c
index 9a4c0ad46518d12d38564a703fdc51f3b202a5ae..fe2ce3a658220b6ba5810ef11952960667eac1ce 100644 (file)
@@ -275,7 +275,7 @@ out_audit:
 int smk_curacc(struct smack_known *obj_known,
               u32 mode, struct smk_audit_info *a)
 {
-       struct task_smack *tsp = current_security();
+       struct task_smack *tsp = smack_cred(current_cred());
 
        return smk_tskacc(tsp, obj_known, mode, a);
 }
@@ -635,12 +635,12 @@ DEFINE_MUTEX(smack_onlycap_lock);
  */
 bool smack_privileged_cred(int cap, const struct cred *cred)
 {
-       struct task_smack *tsp = cred->security;
+       struct task_smack *tsp = smack_cred(cred);
        struct smack_known *skp = tsp->smk_task;
        struct smack_known_list_elem *sklep;
        int rc;
 
-       rc = cap_capable(cred, &init_user_ns, cap, SECURITY_CAP_AUDIT);
+       rc = cap_capable(cred, &init_user_ns, cap, CAP_OPT_NONE);
        if (rc)
                return false;