summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-07 14:06:26 +0000
committerderaadt <deraadt@openbsd.org>2015-10-07 14:06:26 +0000
commitbf0edf090b5225b7099ad4f60f23a6f95e29dd82 (patch)
tree6e1efc3d3b26daf08448708f0a4ce5404a0ce225
parenttame "stdio rpath getpw". getpw is for user_from_uid(), which is a libc (diff)
downloadwireguard-openbsd-bf0edf090b5225b7099ad4f60f23a6f95e29dd82.tar.xz
wireguard-openbsd-bf0edf090b5225b7099ad4f60f23a6f95e29dd82.zip
tame "stdio"; username information does not use getpw
-rw-r--r--usr.bin/logname/logname.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/logname/logname.c b/usr.bin/logname/logname.c
index 3c87132c523..ab7499caf64 100644
--- a/usr.bin/logname/logname.c
+++ b/usr.bin/logname/logname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: logname.c,v 1.7 2009/10/27 23:59:40 deraadt Exp $ */
+/* $OpenBSD: logname.c,v 1.8 2015/10/07 14:06:26 deraadt Exp $ */
/* $NetBSD: logname.c,v 1.6 1994/12/22 06:39:32 jtc Exp $ */
/*-
@@ -46,6 +46,9 @@ main(int argc, char *argv[])
setlocale(LC_ALL, "");
+ if (tame("stdio", NULL) == -1)
+ err(1, "tame");
+
while ((ch = getopt(argc, argv, "")) != -1)
switch (ch) {
case '?':