[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Findutils-patches] [PATCH] Make sure we don't open a file on a standard
From: |
James Youngman |
Subject: |
[Findutils-patches] [PATCH] Make sure we don't open a file on a standard fd (that is, 0/1/2). |
Date: |
Sun, 11 Apr 2010 12:43:24 +0100 |
* lib/fdleak.c: Include fcntl--.h to turn calls to open into calls
to open_safer.
* find/find.c: Likewise.
Signed-off-by: James Youngman <address@hidden>
---
ChangeLog | 5 +++++
find/find.c | 1 +
lib/fdleak.c | 1 +
3 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1b1da1f..71427ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2010-04-11 James Youngman <address@hidden>
+ Make sure we don't open a file on a standard fd (that is, 0/1/2).
+ * lib/fdleak.c: Include fcntl--.h to turn calls to open into calls
+ to open_safer.
+ * find/find.c: Likewise.
+
After-the-fact change to NEWS for 4.5.8: fixed bug 27974.
* NEWS: Mention that release 4.5.8 also fixed bug #27974 (Use
gnulib's xreadlinkat support), though the NEWS file in that
diff --git a/find/find.c b/find/find.c
index 30a2c34..a242d49 100644
--- a/find/find.c
+++ b/find/find.c
@@ -38,6 +38,7 @@
#include <sys/stat.h>
#include <fcntl.h>
+#include "fcntl--.h"
#include "xalloc.h"
#include "human.h"
#include "canonicalize.h"
diff --git a/lib/fdleak.c b/lib/fdleak.c
index 47f9579..d1eb052 100644
--- a/lib/fdleak.c
+++ b/lib/fdleak.c
@@ -29,6 +29,7 @@
#include <assert.h>
#include <stdbool.h>
+#include "fcntl--.h"
#include "dirent-safer.h"
#include "extendbuf.h"
#include "cloexec.h"
--
1.7.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Findutils-patches] [PATCH] Make sure we don't open a file on a standard fd (that is, 0/1/2).,
James Youngman <=