summaryrefslogtreecommitdiffstats
path: root/recipes-security/selinux/libselinux/libselinux-define-FD_CLOEXEC-as-necessary.patch
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2021-03-13 13:50:31 +0800
committerJoe MacDonald <joe@deserted.net>2021-03-17 09:39:50 -0400
commitb78b413a24cf97f5ebda73bcf36fcb15ffbe1abf (patch)
treea94331d8e45daadf00799dabee73a0c6f6ce2c66 /recipes-security/selinux/libselinux/libselinux-define-FD_CLOEXEC-as-necessary.patch
parentd10900fc87b7ac7758b15b275659b8a6e1042397 (diff)
downloadmeta-selinux-b78b413a24cf97f5ebda73bcf36fcb15ffbe1abf.tar.gz
libselinux: update to 3.2
* Merge inc file into bb file. * Drop obsolete patches: 0001-libselinux-do-not-define-gettid-for-musl.patch libselinux-define-FD_CLOEXEC-as-necessary.patch libselinux-make-O_CLOEXEC-optional.patch libselinux-make-SOCK_CLOEXEC-optional.patch Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
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.patch33
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 @@
1From d0aaf391ab30b253aa22ef6547a039bcac840fc6 Mon Sep 17 00:00:00 2001
2From: Joe MacDonald <joe.macdonald@windriver.com>
3Date: Tue, 15 Oct 2013 10:14:41 -0400
4Subject: [PATCH] libselinux: define FD_CLOEXEC as necessary
5
6In truly old systems, even FD_CLOEXEC may not be defined. Produce a
7warning and duplicate the #define for FD_CLOEXEC found in
8asm-generic/fcntl.h on more modern platforms.
9
10Upstream-Status: Inappropriate
11
12Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
13
14---
15 src/setrans_client.c | 5 +++++
16 1 file changed, 5 insertions(+)
17
18diff --git a/src/setrans_client.c b/src/setrans_client.c
19index 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 *