From: deraadt Date: Fri, 16 Oct 2015 22:54:35 +0000 (+0000) Subject: pledge "stdio rpath wpath cpath getpw fattr flock" X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b1b6ff5b9262e72a66abb9a47d9f09ae903e0825;p=openbsd pledge "stdio rpath wpath cpath getpw fattr flock" --- 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",