Revert "tomoyo: fallback to realpath if symlink's pathname does not exist"

This reverts commit 8d86e29a54.
This commit is contained in:
Ksawlii 2024-11-24 00:23:01 +01:00
parent 26d9380b53
commit 3177c82a6a

View file

@ -725,13 +725,10 @@ int tomoyo_find_next_domain(struct linux_binprm *bprm)
ee->r.obj = &ee->obj;
ee->obj.path1 = bprm->file->f_path;
/* Get symlink's pathname of program. */
retval = -ENOENT;
exename.name = tomoyo_realpath_nofollow(original_name);
if (!exename.name) {
/* Fallback to realpath if symlink's pathname does not exist. */
exename.name = tomoyo_realpath_from_path(&bprm->file->f_path);
if (!exename.name)
goto out;
}
tomoyo_fill_path_info(&exename);
retry:
/* Check 'aggregator' directive. */