diff options
author | 2015-10-03 05:13:23 +0000 | |
---|---|---|
committer | 2015-10-03 05:13:23 +0000 | |
commit | a27737171a391056a59931a66fefa8c847cd13f8 (patch) | |
tree | 8033feda8dea5278c71f4cabadd03840b75501ff | |
parent | the chmod & chflags codepaths can use tame "stdio rpath fattr". the (diff) | |
download | wireguard-openbsd-a27737171a391056a59931a66fefa8c847cd13f8.tar.xz wireguard-openbsd-a27737171a391056a59931a66fefa8c847cd13f8.zip |
leave does a fork, but other than that it is boring stdio.
tame "stdio proc" satisfies it.
ok doug
-rw-r--r-- | usr.bin/leave/leave.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/leave/leave.c b/usr.bin/leave/leave.c index 4a317ce3fa3..e7493d54a0b 100644 --- a/usr.bin/leave/leave.c +++ b/usr.bin/leave/leave.c @@ -1,4 +1,4 @@ -/* $OpenBSD: leave.c,v 1.15 2015/01/16 06:40:09 deraadt Exp $ */ +/* $OpenBSD: leave.c,v 1.16 2015/10/03 05:13:23 deraadt Exp $ */ /* $NetBSD: leave.c,v 1.4 1995/07/03 16:50:13 phil Exp $ */ /* @@ -62,7 +62,10 @@ main(int argc, char *argv[]) time_t now; int plusnow = 0, twentyfour; char buf[50]; - + + if (tame("stdio proc", NULL) == -1) + err(1, "tame"); + if (setvbuf(stdout, NULL, _IOLBF, 0) != 0) errx(1, "Cannot set stdout to line buffered."); |