From: nicm Date: Thu, 30 Apr 2015 14:16:49 +0000 (+0000) Subject: Tweak comment so it doesn't imply line buffering is needed (any will do X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=856dd03e2239ff1558a7e724adfabb6ce3d09fe6;p=openbsd Tweak comment so it doesn't imply line buffering is needed (any will do so long as it is explicit), and set stderr to NBF not LBF. Pointed out by espie@. --- diff --git a/usr.bin/file/sandbox.c b/usr.bin/file/sandbox.c index b0ebb51c8ca..2295a53efee 100644 --- a/usr.bin/file/sandbox.c +++ b/usr.bin/file/sandbox.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sandbox.c,v 1.2 2015/04/29 06:37:14 deraadt Exp $ */ +/* $OpenBSD: sandbox.c,v 1.3 2015/04/30 14:16:49 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -79,12 +79,11 @@ sandbox_child(const char *user) struct passwd *pw; /* - * If we don't set streams to line buffered explicitly, stdio uses - * isatty() which means ioctl() - too nasty to let through the systrace - * policy. + * If we don't set stream buffering explicitly, stdio calls isatty() + * which means ioctl() - too nasty to let through the systrace policy. */ setvbuf(stdout, NULL, _IOLBF, 0); - setvbuf(stderr, NULL, _IOLBF, 0); + setvbuf(stderr, NULL, _IONBF, 0); if (geteuid() == 0) { pw = getpwnam(user);