From bf0edf090b5225b7099ad4f60f23a6f95e29dd82 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 7 Oct 2015 14:06:26 +0000 Subject: [PATCH] tame "stdio"; username information does not use getpw --- usr.bin/logname/logname.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 '?': -- 2.20.1