diff options
Diffstat (limited to 'recipes-security/selinux/libselinux/libselinux-define-FD_CLOEXEC-as-necessary.patch')
| -rw-r--r-- | recipes-security/selinux/libselinux/libselinux-define-FD_CLOEXEC-as-necessary.patch | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/recipes-security/selinux/libselinux/libselinux-define-FD_CLOEXEC-as-necessary.patch b/recipes-security/selinux/libselinux/libselinux-define-FD_CLOEXEC-as-necessary.patch deleted file mode 100644 index 25d4b24..0000000 --- a/recipes-security/selinux/libselinux/libselinux-define-FD_CLOEXEC-as-necessary.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | From d0aaf391ab30b253aa22ef6547a039bcac840fc6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Joe MacDonald <joe.macdonald@windriver.com> | ||
| 3 | Date: Tue, 15 Oct 2013 10:14:41 -0400 | ||
| 4 | Subject: [PATCH] libselinux: define FD_CLOEXEC as necessary | ||
| 5 | |||
| 6 | In truly old systems, even FD_CLOEXEC may not be defined. Produce a | ||
| 7 | warning and duplicate the #define for FD_CLOEXEC found in | ||
| 8 | asm-generic/fcntl.h on more modern platforms. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate | ||
| 11 | |||
| 12 | Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> | ||
| 13 | |||
| 14 | --- | ||
| 15 | src/setrans_client.c | 5 +++++ | ||
| 16 | 1 file changed, 5 insertions(+) | ||
| 17 | |||
| 18 | diff --git a/src/setrans_client.c b/src/setrans_client.c | ||
| 19 | index fa188a8..a94f02c 100644 | ||
| 20 | --- a/src/setrans_client.c | ||
| 21 | +++ b/src/setrans_client.c | ||
| 22 | @@ -39,6 +39,11 @@ static pthread_key_t destructor_key; | ||
| 23 | static int destructor_key_initialized = 0; | ||
| 24 | static __thread char destructor_initialized; | ||
| 25 | |||
| 26 | +#ifndef FD_CLOEXEC | ||
| 27 | +#warning FD_CLOEXEC undefined on this platform, this may leak file descriptors | ||
| 28 | +#define FD_CLOEXEC 1 | ||
| 29 | +#endif | ||
| 30 | + | ||
| 31 | /* | ||
| 32 | * setransd_open | ||
| 33 | * | ||
