summaryrefslogtreecommitdiff
path: root/bin/dd/dd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-04 15:01:48 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-10-04 15:01:48 +0000
commit7e6928780056fb1f09781c1ecfaf7a7615b0be93 (patch)
treecb57f822b1fb5e924f3ad21cd5ddbd5bc8618811 /bin/dd/dd.c
parent05688e2a5f70744836e67b12fdd1a47a147541f8 (diff)
after dd has opened it's files and done the tape positioning ioctl, we
can tame "stdio" it. ok semarie
Diffstat (limited to 'bin/dd/dd.c')
-rw-r--r--bin/dd/dd.c5
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.