From: deraadt Date: Wed, 7 Oct 2015 14:06:26 +0000 (+0000) Subject: tame "stdio"; username information does not use getpw X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bf0edf090b5225b7099ad4f60f23a6f95e29dd82;p=openbsd tame "stdio"; username information does not use getpw --- 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 '?':