summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-15 23:14:22 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-15 23:14:22 +0000
commita08be953a4c30133c652cf69b33fa3def5e620c4 (patch)
tree122e98163a3fc1372950af1fc10042e1145bb9ab /usr.sbin
parent8378fbcb8ca835e0420792c1b6460074ca1bd1a9 (diff)
pledge "stdio rpath wpath cpath fattr getpw flock id proc exec" at the
top. It is a lot, maybe someone will take the time to find smaller chunks later in the program. tested by jca
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/user/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/user/main.c b/usr.sbin/user/main.c
index 6e7d7612ef1..4c0cd9f8a6c 100644
--- a/usr.sbin/user/main.c
+++ b/usr.sbin/user/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.7 2011/12/31 14:05:51 ajacoutot Exp $ */
+/* $OpenBSD: main.c,v 1.8 2015/11/15 23:14:21 deraadt Exp $ */
/* $NetBSD: main.c,v 1.3 2002/07/09 10:34:16 tron Exp $ */
/*
@@ -80,6 +80,10 @@ main(int argc, char **argv)
int matched;
int i;
+ if (pledge("stdio rpath wpath cpath fattr getpw flock id proc exec",
+ NULL) == -1)
+ err(1, "pledge");
+
for (cmdp = cmds ; cmdp->c_wc > 0 ; cmdp++) {
for (matched = i = 0 ; i < cmdp->c_wc && i < MaxCmdWords ; i++) {
if (argc > i) {