aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/domain.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/tomoyo/domain.c')
-rw-r--r--security/tomoyo/domain.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c
index a07ca6dc1a08..09ec37c12a9c 100644
--- a/security/tomoyo/domain.c
+++ b/security/tomoyo/domain.c
@@ -812,8 +812,8 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm)
812 struct tomoyo_domain_info *domain = NULL; 812 struct tomoyo_domain_info *domain = NULL;
813 const char *old_domain_name = old_domain->domainname->name; 813 const char *old_domain_name = old_domain->domainname->name;
814 const char *original_name = bprm->filename; 814 const char *original_name = bprm->filename;
815 const u8 mode = tomoyo_check_flags(old_domain, TOMOYO_MAC_FOR_FILE); 815 u8 mode;
816 const bool is_enforce = (mode == TOMOYO_CONFIG_ENFORCING); 816 bool is_enforce;
817 int retval = -ENOMEM; 817 int retval = -ENOMEM;
818 bool need_kfree = false; 818 bool need_kfree = false;
819 struct tomoyo_path_info rn = { }; /* real name */ 819 struct tomoyo_path_info rn = { }; /* real name */
@@ -822,7 +822,8 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm)
822 822
823 ln.name = tomoyo_get_last_name(old_domain); 823 ln.name = tomoyo_get_last_name(old_domain);
824 tomoyo_fill_path_info(&ln); 824 tomoyo_fill_path_info(&ln);
825 tomoyo_init_request_info(&r, NULL); 825 mode = tomoyo_init_request_info(&r, NULL, TOMOYO_MAC_FILE_EXECUTE);
826 is_enforce = (mode == TOMOYO_CONFIG_ENFORCING);
826 if (!tmp) 827 if (!tmp)
827 goto out; 828 goto out;
828 829
@@ -880,7 +881,7 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm)
880 } 881 }
881 882
882 /* Check execute permission. */ 883 /* Check execute permission. */
883 retval = tomoyo_check_exec_perm(old_domain, &rn); 884 retval = tomoyo_check_exec_perm(&r, &rn);
884 if (retval == TOMOYO_RETRY_REQUEST) 885 if (retval == TOMOYO_RETRY_REQUEST)
885 goto retry; 886 goto retry;
886 if (retval < 0) 887 if (retval < 0)