Commit 221272f9 authored by Kees Cook's avatar Kees Cook

seccomp: swap hard-coded zeros to defined name

For clarity, if CONFIG_SECCOMP isn't defined, seccomp_mode() is returning
"disabled". This makes that more clear, along with another 0-use, and
results in no operational change.
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent 13c4a901
...@@ -78,7 +78,7 @@ static inline long prctl_set_seccomp(unsigned long arg2, char __user *arg3) ...@@ -78,7 +78,7 @@ static inline long prctl_set_seccomp(unsigned long arg2, char __user *arg3)
static inline int seccomp_mode(struct seccomp *s) static inline int seccomp_mode(struct seccomp *s)
{ {
return 0; return SECCOMP_MODE_DISABLED;
} }
#endif /* CONFIG_SECCOMP */ #endif /* CONFIG_SECCOMP */
......
...@@ -594,7 +594,7 @@ void secure_computing_strict(int this_syscall) ...@@ -594,7 +594,7 @@ void secure_computing_strict(int this_syscall)
unlikely(current->ptrace & PT_SUSPEND_SECCOMP)) unlikely(current->ptrace & PT_SUSPEND_SECCOMP))
return; return;
if (mode == 0) if (mode == SECCOMP_MODE_DISABLED)
return; return;
else if (mode == SECCOMP_MODE_STRICT) else if (mode == SECCOMP_MODE_STRICT)
__secure_computing_strict(this_syscall); __secure_computing_strict(this_syscall);
......
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