summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shred.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shred.c b/src/shred.c
index 8a1d114bd..ebe6e06ea 100644
--- a/src/shred.c
+++ b/src/shred.c
@@ -1442,11 +1442,11 @@ wipefile (char *name, char const *qname,
bool ok;
int fd;
- fd = open (name, O_WRONLY | O_NOCTTY);
+ fd = open (name, O_WRONLY | O_NOCTTY | O_BINARY);
if (fd < 0
&& (errno == EACCES && flags->force)
&& chmod (name, S_IWUSR) == 0)
- fd = open (name, O_WRONLY | O_NOCTTY);
+ fd = open (name, O_WRONLY | O_NOCTTY | O_BINARY);
if (fd < 0)
{
error (0, errno, _("%s: failed to open for writing"), qname);