diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2020-12-02 01:12:16 +0100 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2020-12-02 01:12:16 +0100 |
commit | 160e2f8258cb2a3f8cf055658b1840df5347bd6a (patch) | |
tree | dcaf7c65c876ddd6f53716ca2604c4f6cc3b4c55 | |
parent | f65445d23c902253af96f97d336378a78851b474 (diff) | |
download | findutils-160e2f8258cb2a3f8cf055658b1840df5347bd6a.tar.gz |
maint: use more *-safer gnulib modules
See section "Handling closed standard file descriptors" in the gnulib
manual.
* bootstrip.conf (gnulib_modules): Add fcntl-safer, openat-safer
and unistd-safer.
* find/exec.c: Include "fcntl--.h" to use the *-safer variant of open()
or openat().
* find/pred.c: Likewise.
* locate/locate.c: Likewise.
* xargs/xargs.c: Likewise, and include "unustd--.h" to use the *-safer
variant of pipe().
-rw-r--r-- | bootstrap.conf | 3 | ||||
-rw-r--r-- | find/exec.c | 1 | ||||
-rw-r--r-- | find/pred.c | 1 | ||||
-rw-r--r-- | locate/locate.c | 1 | ||||
-rw-r--r-- | xargs/xargs.c | 2 |
5 files changed, 8 insertions, 0 deletions
diff --git a/bootstrap.conf b/bootstrap.conf index 8e0dbcf1..a80e2897 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -93,6 +93,7 @@ gnulib_modules=" faccessat fchdir fcntl + fcntl-safer fdopendir fflush fileblocks @@ -131,6 +132,7 @@ gnulib_modules=" mountlist nstrftime open + openat-safer parse-datetime pathmax perror @@ -167,6 +169,7 @@ gnulib_modules=" sys_wait timespec uname + unistd-safer unlinkat verify version-etc diff --git a/find/exec.c b/find/exec.c index 5551de56..e8f14d10 100644 --- a/find/exec.c +++ b/find/exec.c @@ -30,6 +30,7 @@ #include "cloexec.h" #include "dirname.h" #include "error.h" +#include "fcntl--.h" #include "save-cwd.h" #include "xalloc.h" diff --git a/find/pred.c b/find/pred.c index 9f2f159e..7a64a866 100644 --- a/find/pred.c +++ b/find/pred.c @@ -38,6 +38,7 @@ #include "areadlink.h" #include "dirname.h" #include "error.h" +#include "fcntl--.h" #include "fnmatch.h" #include "stat-size.h" #include "stat-time.h" diff --git a/locate/locate.c b/locate/locate.c index b3a49b84..bcd76103 100644 --- a/locate/locate.c +++ b/locate/locate.c @@ -84,6 +84,7 @@ #include "progname.h" #include "xalloc.h" #include "error.h" +#include "fcntl--.h" #include "human.h" #include "dirname.h" #include "closeout.h" diff --git a/xargs/xargs.c b/xargs/xargs.c index e9ef763c..1149999c 100644 --- a/xargs/xargs.c +++ b/xargs/xargs.c @@ -54,9 +54,11 @@ /* gnulib headers. */ #include "closein.h" #include "error.h" +#include "fcntl--.h" #include "progname.h" #include "quotearg.h" #include "safe-read.h" +#include "unistd--.h" #include "xalloc.h" /* find headers. */ |