summaryrefslogtreecommitdiff
path: root/include/linux/Kbuild
diff options
context:
space:
mode:
authorSerge E. Hallyn <serue@us.ibm.com>2009-10-29 11:40:17 -0500
committerJames Morris <jmorris@namei.org>2009-10-30 08:27:25 +1100
commit5975c725dfd6f7d36f493ab1453fbdbd35c1f0e3 (patch)
tree1beb7ac54f2b1b7917faee08bba39b5eba2b4cfa /include/linux/Kbuild
parentff76ec18cabb12a6c8f3c65bd1d23f1a770fe908 (diff)
define convenient securebits masks for prctl users (v2)
Hi James, would you mind taking the following into security-testing? The securebits are used by passing them to prctl with the PR_{S,G}ET_SECUREBITS commands. But the defines must be shifted to be used in prctl, which begs to be confused and misused by userspace. So define some more convenient values for userspace to specify. This way userspace does prctl(PR_SET_SECUREBITS, SECBIT_NOROOT); instead of prctl(PR_SET_SECUREBITS, 1 << SECURE_NOROOT); (Thanks to Michael for the idea) This patch also adds include/linux/securebits to the installed headers. Then perhaps it can be included by glibc's sys/prctl.h. Changelog: Oct 29: Stephen Rothwell points out that issecure can be under __KERNEL__. Oct 14: (Suggestions by Michael Kerrisk): 1. spell out SETUID in SECBIT_NO_SETUID* 2. SECBIT_X_LOCKED does not imply SECBIT_X 3. add definitions for keepcaps Oct 14: As suggested by Michael Kerrisk, don't use SB_* as that convention is already in use. Use SECBIT_ prefix instead. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Acked-by: Andrew G. Morgan <morgan@kernel.org> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Ulrich Drepper <drepper@redhat.com> Cc: James Morris <jmorris@namei.org> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'include/linux/Kbuild')
-rw-r--r--include/linux/Kbuild1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index cff4a101f266..ffcdb9b509db 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -329,6 +329,7 @@ unifdef-y += scc.h
unifdef-y += sched.h
unifdef-y += screen_info.h
unifdef-y += sdla.h
+unifdef-y += securebits.h
unifdef-y += selinux_netlink.h
unifdef-y += sem.h
unifdef-y += serial_core.h