summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pwd_mkdb
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-16 22:54:35 +0000
committerderaadt <deraadt@openbsd.org>2015-10-16 22:54:35 +0000
commitb1b6ff5b9262e72a66abb9a47d9f09ae903e0825 (patch)
tree8fc233b3603c046866d71eb94d14ef3e49c882d0 /usr.sbin/pwd_mkdb
parentpledge "stdio rpath wpath cpath fattr proc exec" (diff)
downloadwireguard-openbsd-b1b6ff5b9262e72a66abb9a47d9f09ae903e0825.tar.xz
wireguard-openbsd-b1b6ff5b9262e72a66abb9a47d9f09ae903e0825.zip
pledge "stdio rpath wpath cpath getpw fattr flock"
Diffstat (limited to 'usr.sbin/pwd_mkdb')
-rw-r--r--usr.sbin/pwd_mkdb/pwd_mkdb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c
index 1e8b3991c05..20d1733dfe6 100644
--- a/usr.sbin/pwd_mkdb/pwd_mkdb.c
+++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pwd_mkdb.c,v 1.50 2015/08/27 19:11:37 gsoares Exp $ */
+/* $OpenBSD: pwd_mkdb.c,v 1.51 2015/10/16 22:54:35 deraadt Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -233,6 +233,9 @@ main(int argc, char **argv)
warn("%s: unable to make group readable", _PATH_SMP_DB);
clean |= FILE_SECURE;
+ if (pledge("stdio rpath wpath cpath getpw fattr flock", NULL) == -1)
+ err(1, "pledge");
+
/* Open the temporary insecure password database. */
if (!secureonly) {
(void)snprintf(buf, sizeof(buf), "%s.tmp",