]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - security/tomoyo/domain.c
UBUNTU: SAUCE: LSM stacking: LSM: Manage task security blobs
[mirror_ubuntu-bionic-kernel.git] / security / tomoyo / domain.c
index f6758dad981f7f32d8897f4f2c790ea69a168db0..b7469fdbff01d27f234658022ee84dfaca2394a8 100644 (file)
@@ -678,6 +678,7 @@ out:
  */
 int tomoyo_find_next_domain(struct linux_binprm *bprm)
 {
+       struct tomoyo_domain_info **blob;
        struct tomoyo_domain_info *old_domain = tomoyo_domain();
        struct tomoyo_domain_info *domain = NULL;
        const char *original_name = bprm->filename;
@@ -843,7 +844,8 @@ force_jump_domain:
                domain = old_domain;
        /* Update reference count on "struct tomoyo_domain_info". */
        atomic_inc(&domain->users);
-       bprm->cred->security = domain;
+       blob = tomoyo_cred(bprm->cred);
+       *blob = domain;
        kfree(exename.name);
        if (!retval) {
                ee->r.domain = domain;