diff options
author | Stephen Smalley <sds@tycho.nsa.gov> | 2016-03-07 15:52:42 -0500 |
---|---|---|
committer | Philip Tricca <flihp@twobit.us> | 2016-03-17 02:25:04 +0000 |
commit | 81c08f019b1edc4fe97a2e2b5cc7687114e99ec8 (patch) | |
tree | cf7f362f677c97b39e8b592f6dd274e81c7e15da /recipes-security/selinux/libselinux/libselinux-make-O_CLOEXEC-optional.patch | |
parent | 06d8dac0530674a8eae9b2f030f11c59980b2586 (diff) | |
download | meta-selinux-81c08f019b1edc4fe97a2e2b5cc7687114e99ec8.tar.gz |
libselinux: uprev to 2.5 (20160223)
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Philip Tricca <flihp@twobit.us>
Diffstat (limited to 'recipes-security/selinux/libselinux/libselinux-make-O_CLOEXEC-optional.patch')
-rw-r--r-- | recipes-security/selinux/libselinux/libselinux-make-O_CLOEXEC-optional.patch | 67 |
1 files changed, 32 insertions, 35 deletions
diff --git a/recipes-security/selinux/libselinux/libselinux-make-O_CLOEXEC-optional.patch b/recipes-security/selinux/libselinux/libselinux-make-O_CLOEXEC-optional.patch index 453334e..98d31cc 100644 --- a/recipes-security/selinux/libselinux/libselinux-make-O_CLOEXEC-optional.patch +++ b/recipes-security/selinux/libselinux/libselinux-make-O_CLOEXEC-optional.patch | |||
@@ -24,13 +24,13 @@ Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> | |||
24 | src/stringrep.c | 8 +++++++- | 24 | src/stringrep.c | 8 +++++++- |
25 | 4 files changed, 28 insertions(+), 4 deletions(-) | 25 | 4 files changed, 28 insertions(+), 4 deletions(-) |
26 | 26 | ||
27 | diff --git a/src/label_file.c b/src/label_file.c | 27 | Index: libselinux-2.5/src/label_file.c |
28 | index 5f697f3..49bb8df 100644 | 28 | =================================================================== |
29 | --- a/src/label_file.c | 29 | --- libselinux-2.5.orig/src/label_file.c 2016-02-25 13:10:00.159980383 -0500 |
30 | +++ b/src/label_file.c | 30 | +++ libselinux-2.5/src/label_file.c 2016-02-25 13:10:00.155980383 -0500 |
31 | @@ -255,7 +255,13 @@ static int load_mmap(struct selabel_handle *rec, const char *path, struct stat * | 31 | @@ -124,7 +124,13 @@ |
32 | if (rc >= sizeof(mmap_path)) | 32 | return -1; |
33 | return -1; | 33 | } |
34 | 34 | ||
35 | - mmapfd = open(mmap_path, O_RDONLY | O_CLOEXEC); | 35 | - mmapfd = open(mmap_path, O_RDONLY | O_CLOEXEC); |
36 | + mmapfd = open(mmap_path, O_RDONLY | 36 | + mmapfd = open(mmap_path, O_RDONLY |
@@ -43,30 +43,30 @@ index 5f697f3..49bb8df 100644 | |||
43 | if (mmapfd < 0) | 43 | if (mmapfd < 0) |
44 | return -1; | 44 | return -1; |
45 | 45 | ||
46 | diff --git a/src/procattr.c b/src/procattr.c | 46 | Index: libselinux-2.5/src/procattr.c |
47 | index 6c5b45a..6cfe589 100644 | 47 | =================================================================== |
48 | --- a/src/procattr.c | 48 | --- libselinux-2.5.orig/src/procattr.c 2016-02-25 13:10:00.159980383 -0500 |
49 | +++ b/src/procattr.c | 49 | +++ libselinux-2.5/src/procattr.c 2016-02-25 13:11:58.527980013 -0500 |
50 | @@ -86,7 +86,13 @@ static int openattr(pid_t pid, const char *attr, int flags) | 50 | @@ -76,7 +76,13 @@ |
51 | if (rc < 0) | 51 | rc = asprintf(&path, "/proc/thread-self/attr/%s", attr); |
52 | return -1; | 52 | if (rc < 0) |
53 | 53 | return -1; | |
54 | - fd = open(path, flags | O_CLOEXEC); | 54 | - fd = open(path, flags | O_CLOEXEC); |
55 | + fd = open(path, flags | 55 | + fd = open(path, flags |
56 | +#ifdef O_CLOEXEC | 56 | +#ifdef O_CLOEXEC |
57 | + | O_CLOEXEC | 57 | + | O_CLOEXEC |
58 | +#else | 58 | +#else |
59 | +#warning O_CLOEXEC undefined on this platform, this may leak file descriptors | 59 | +#warning O_CLOEXEC undefined on this platform, this may leak file descriptors |
60 | +#endif | 60 | +#endif |
61 | + ); | 61 | + ); |
62 | free(path); | 62 | if (fd >= 0 || errno != ENOENT) |
63 | return fd; | 63 | goto out; |
64 | } | 64 | free(path); |
65 | diff --git a/src/sestatus.c b/src/sestatus.c | 65 | Index: libselinux-2.5/src/sestatus.c |
66 | index ed29dc5..0cb15b6 100644 | 66 | =================================================================== |
67 | --- a/src/sestatus.c | 67 | --- libselinux-2.5.orig/src/sestatus.c 2016-02-25 13:10:00.159980383 -0500 |
68 | +++ b/src/sestatus.c | 68 | +++ libselinux-2.5/src/sestatus.c 2016-02-25 13:10:00.155980383 -0500 |
69 | @@ -268,7 +268,13 @@ int selinux_status_open(int fallback) | 69 | @@ -268,7 +268,13 @@ |
70 | return -1; | 70 | return -1; |
71 | 71 | ||
72 | snprintf(path, sizeof(path), "%s/status", selinux_mnt); | 72 | snprintf(path, sizeof(path), "%s/status", selinux_mnt); |
@@ -81,11 +81,11 @@ index ed29dc5..0cb15b6 100644 | |||
81 | if (fd < 0) | 81 | if (fd < 0) |
82 | goto error; | 82 | goto error; |
83 | 83 | ||
84 | diff --git a/src/stringrep.c b/src/stringrep.c | 84 | Index: libselinux-2.5/src/stringrep.c |
85 | index ba75ccd..e6ccfd5 100644 | 85 | =================================================================== |
86 | --- a/src/stringrep.c | 86 | --- libselinux-2.5.orig/src/stringrep.c 2016-02-25 13:10:00.159980383 -0500 |
87 | +++ b/src/stringrep.c | 87 | +++ libselinux-2.5/src/stringrep.c 2016-02-25 13:10:00.155980383 -0500 |
88 | @@ -258,7 +258,13 @@ static struct discover_class_node * discover_class(const char *s) | 88 | @@ -105,7 +105,13 @@ |
89 | struct stat m; | 89 | struct stat m; |
90 | 90 | ||
91 | snprintf(path, sizeof path, "%s/class/%s/perms/%s", selinux_mnt,s,dentry->d_name); | 91 | snprintf(path, sizeof path, "%s/class/%s/perms/%s", selinux_mnt,s,dentry->d_name); |
@@ -100,6 +100,3 @@ index ba75ccd..e6ccfd5 100644 | |||
100 | if (fd < 0) | 100 | if (fd < 0) |
101 | goto err4; | 101 | goto err4; |
102 | 102 | ||
103 | -- | ||
104 | 1.7.10.4 | ||
105 | |||