diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-04-30 14:16:50 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-04-30 14:16:50 +0000 |
commit | 5ced54f85ebf85a60d8d9bc7ec1cca36933050d2 (patch) | |
tree | 5cc2eb4400de7762f8087ca7b7e52b5004d590b8 /usr.bin/file | |
parent | 1498814c23d017012f5fe728b1b77f6032c3b0fa (diff) |
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@.
Diffstat (limited to 'usr.bin/file')
-rw-r--r-- | usr.bin/file/sandbox.c | 9 |
1 files changed, 4 insertions, 5 deletions
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 <nicm@openbsd.org> @@ -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); |