History

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.

Kees Cook committed 11 years ago

Commit 221272f1 parent 13c4a902 files · +2 −2Browse files

Unified · Split

2 files
  1. include/linux/seccomp.h +1 −1
  2. kernel/seccomp.c +1 −1
include/linux/seccomp.h+1−1
@@ -78,7 +78,7 @@ static inline long prctl_set_seccomp(unsigned long arg2, char __user *arg3) · 77 unmodified lines
7878
7979 static inline int seccomp_mode(struct seccomp *s)
8080 {
81− return 0;
81+ return SECCOMP_MODE_DISABLED;
8282 }
8383 #endif /* CONFIG_SECCOMP */
8484
kernel/seccomp.c+1−1
@@ -594,7 +594,7 @@ void secure_computing_strict(int this_syscall) · 593 unmodified lines
594594 unlikely(current->ptrace & PT_SUSPEND_SECCOMP))
595595 return;
596596
597− if (mode == 0)
597+ if (mode == SECCOMP_MODE_DISABLED)
598598 return;
599599 else if (mode == SECCOMP_MODE_STRICT)
600600 __secure_computing_strict(this_syscall);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t