Commit 227175b2 authored by Nicolas Viennot's avatar Nicolas Viennot Committed by Christian Brauner

prctl: exe link permission error changed from -EINVAL to -EPERM

This brings consistency with the rest of the prctl() syscall where
-EPERM is returned when failing a capability check.
Signed-off-by: default avatarNicolas Viennot <Nicolas.Viennot@twosigma.com>
Signed-off-by: default avatarAdrian Reber <areber@redhat.com>
Reviewed-by: default avatarSerge Hallyn <serge@hallyn.com>
Link: https://lore.kernel.org/r/20200719100418.2112740-7-areber@redhat.comSigned-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
parent ebd6de68
...@@ -2015,7 +2015,7 @@ static int prctl_set_mm_map(int opt, const void __user *addr, unsigned long data ...@@ -2015,7 +2015,7 @@ static int prctl_set_mm_map(int opt, const void __user *addr, unsigned long data
* This may have implications in the tomoyo subsystem. * This may have implications in the tomoyo subsystem.
*/ */
if (!checkpoint_restore_ns_capable(current_user_ns())) if (!checkpoint_restore_ns_capable(current_user_ns()))
return -EINVAL; return -EPERM;
error = prctl_set_mm_exe_file(mm, prctl_map.exe_fd); error = prctl_set_mm_exe_file(mm, prctl_map.exe_fd);
if (error) if (error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment