From ce00cad00f1de8822c246037882a68facf131751 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 3 Jul 2005 07:19:29 +0000 Subject: [PATCH] Include fcntl--.h, not unistd-safer.h. (wipename, wipe_file): Don't use fd_safer; no longer needed now that we include fcntl--.h. --- src/shred.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/shred.c b/src/shred.c index 3348ff4f7c..8a1d114bd2 100644 --- a/src/shred.c +++ b/src/shred.c @@ -102,13 +102,13 @@ #include "xstrtol.h" #include "dirname.h" #include "error.h" +#include "fcntl--.h" #include "gethrxtime.h" #include "getpagesize.h" #include "human.h" #include "inttostr.h" #include "quotearg.h" /* For quotearg_colon */ #include "quote.h" /* For quotearg_colon */ -#include "unistd-safer.h" #define DEFAULT_PASSES 25 /* Default */ @@ -1354,7 +1354,6 @@ wipename (char *oldname, char const *qoldname, struct Options const *flags) int dir_fd = open (dir, O_WRONLY | O_NOCTTY); if (dir_fd < 0) dir_fd = open (dir, O_RDONLY | O_NOCTTY); - dir_fd = fd_safer (dir_fd); if (flags->verbose) error (0, 0, _("%s: removing"), qoldname); @@ -1448,7 +1447,6 @@ wipefile (char *name, char const *qname, && (errno == EACCES && flags->force) && chmod (name, S_IWUSR) == 0) fd = open (name, O_WRONLY | O_NOCTTY); - fd = fd_safer (fd); if (fd < 0) { error (0, errno, _("%s: failed to open for writing"), qname); -- 2.47.3