summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-07 14:05:07 +0000
committerderaadt <deraadt@openbsd.org>2015-10-07 14:05:07 +0000
commitd593eea8260a4c0cfe896db102a2c6fe69d225e0 (patch)
tree7ceb18c3279f9c5a5e24de1629e02fe627cb306d
parentgetaddrinfo_async() shouldn't unconditionally intialize the resolver (diff)
downloadwireguard-openbsd-d593eea8260a4c0cfe896db102a2c6fe69d225e0.tar.xz
wireguard-openbsd-d593eea8260a4c0cfe896db102a2c6fe69d225e0.zip
tame "stdio rpath getpw". getpw is for user_from_uid(), which is a libc
cache on top of the getpw* functions. ok semarie, who didn't spot the getpw need :)
-rw-r--r--usr.bin/lastcomm/lastcomm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/lastcomm/lastcomm.c b/usr.bin/lastcomm/lastcomm.c
index 94f107393be..b4843dc160c 100644
--- a/usr.bin/lastcomm/lastcomm.c
+++ b/usr.bin/lastcomm/lastcomm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lastcomm.c,v 1.21 2015/03/15 00:41:28 millert Exp $ */
+/* $OpenBSD: lastcomm.c,v 1.22 2015/10/07 14:05:07 deraadt Exp $ */
/* $NetBSD: lastcomm.c,v 1.9 1995/10/22 01:43:42 ghudson Exp $ */
/*
@@ -69,6 +69,9 @@ main(int argc, char *argv[])
int ch;
char *acctfile;
+ if (tame("stdio rpath getpw", NULL) == -1)
+ err(1, "tame");
+
acctfile = _PATH_ACCT;
while ((ch = getopt(argc, argv, "f:")) != -1)
switch(ch) {