Merge tag 'rtc-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
[linux-2.6-block.git] / security / apparmor / task.c
index c6b78a14da91842a7288e4c92e6db490284f0c4c..4551110f049694311ab5958770a94cac2331ab9b 100644 (file)
@@ -81,7 +81,7 @@ int aa_replace_current_label(struct aa_label *label)
         */
        aa_get_label(label);
        aa_put_label(cred_label(new));
-       cred_label(new) = label;
+       set_cred_label(new, label);
 
        commit_creds(new);
        return 0;
@@ -138,7 +138,7 @@ int aa_set_current_hat(struct aa_label *label, u64 token)
                return -EACCES;
        }
 
-       cred_label(new) = aa_get_newest_label(label);
+       set_cred_label(new, aa_get_newest_label(label));
        /* clear exec on switching context */
        aa_put_label(ctx->onexec);
        ctx->onexec = NULL;
@@ -172,7 +172,7 @@ int aa_restore_previous_label(u64 token)
                return -ENOMEM;
 
        aa_put_label(cred_label(new));
-       cred_label(new) = aa_get_newest_label(ctx->previous);
+       set_cred_label(new, aa_get_newest_label(ctx->previous));
        AA_BUG(!cred_label(new));
        /* clear exec && prev information when restoring to previous context */
        aa_clear_task_ctx_trans(ctx);