[Devel] [RFC 08/54] exec: fix CONFIG_VE=n build
Eva Kurchatova
eva.kurchatova at virtuozzo.com
Wed Apr 29 22:58:08 MSK 2026
Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
---
fs/exec.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/exec.c b/fs/exec.c
index 8f1862b2646d..edb128ea4455 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -160,10 +160,10 @@ SYSCALL_DEFINE1(uselib, const char __user *, library)
if (WARN_ON_ONCE(!S_ISREG(file_inode(file)->i_mode)) ||
path_noexec(&file->f_path))
goto exit;
-
+#ifdef CONFIG_VE
if (!ve_check_trusted_exec(file, tmp))
goto exit;
-
+#endif
putname(tmp);
tmp = NULL;
@@ -932,10 +932,12 @@ static struct file *do_open_execat(int fd, struct filename *name, int flags)
return ERR_PTR(-EACCES);
}
+#ifdef CONFIG_VE
if (!ve_check_trusted_exec(file, name)) {
fput(file);
return ERR_PTR(-EACCES);
}
+#endif
return file;
}
--
2.54.0
More information about the Devel
mailing list