diff options
author | 2015-10-04 15:01:47 +0000 | |
---|---|---|
committer | 2015-10-04 15:01:47 +0000 | |
commit | 7d0369c1a96b4874dd10c35e3cbdd264d725628a (patch) | |
tree | b613cf23aeaebb39784a30b3c55ea6c931ed8f0b | |
parent | Plural. (diff) | |
download | wireguard-openbsd-7d0369c1a96b4874dd10c35e3cbdd264d725628a.tar.xz wireguard-openbsd-7d0369c1a96b4874dd10c35e3cbdd264d725628a.zip |
after dd has opened it's files and done the tape positioning ioctl, we
can tame "stdio" it.
ok semarie
-rw-r--r-- | bin/dd/dd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/dd/dd.c b/bin/dd/dd.c index 715a1aa79fd..586b47b6548 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dd.c,v 1.21 2015/01/16 06:39:31 deraadt Exp $ */ +/* $OpenBSD: dd.c,v 1.22 2015/10/04 15:01:47 deraadt Exp $ */ /* $NetBSD: dd.c,v 1.6 1996/02/20 19:29:06 jtc Exp $ */ /*- @@ -149,6 +149,9 @@ setup(void) if (out.offset) pos_out(); + if (tame("stdio", NULL) == -1) + err(1, "tame"); + /* * Truncate the output file; ignore errors because it fails on some * kinds of output files, tapes, for example. |