summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/libcgroup/libcgroup
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/libcgroup/libcgroup')
-rw-r--r--meta/recipes-core/libcgroup/libcgroup/0001-include-Makefile-install-systemd.h-by-default.patch37
-rw-r--r--meta/recipes-core/libcgroup/libcgroup/CVE-2018-14348.patch37
-rw-r--r--meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch235
3 files changed, 37 insertions, 272 deletions
diff --git a/meta/recipes-core/libcgroup/libcgroup/0001-include-Makefile-install-systemd.h-by-default.patch b/meta/recipes-core/libcgroup/libcgroup/0001-include-Makefile-install-systemd.h-by-default.patch
new file mode 100644
index 0000000000..4b743f9b33
--- /dev/null
+++ b/meta/recipes-core/libcgroup/libcgroup/0001-include-Makefile-install-systemd.h-by-default.patch
@@ -0,0 +1,37 @@
1From 592dcdcf243576bd2517d3da9bc18990de08e37e Mon Sep 17 00:00:00 2001
2From: Kamalesh Babulal <kamalesh.babulal@oracle.com>
3Date: Mon, 27 Nov 2023 20:07:33 +0530
4Subject: [PATCH 1/1] include/Makefile: install systemd.h by default
5
6Install systemd.h header file by default, as we have stub and defined
7versions of the systemd functions for both non-systemd and systemd
8enabled configurations. This will help packagers to ship package
9without systemd support (--enable-systemd=no).
10
11Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
12Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
13
14Upstream-Status: Backport [https://github.com/libcgroup/libcgroup/commit/592dcdcf243576bd2517d3da9bc18990de08e37e]
15
16Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
17---
18 include/Makefile.am | 6 +-----
19 1 file changed, 1 insertion(+), 5 deletions(-)
20
21diff --git a/include/Makefile.am b/include/Makefile.am
22index 23cebaac..4cb05529 100644
23--- a/include/Makefile.am
24+++ b/include/Makefile.am
25@@ -2,8 +2,4 @@
26 nobase_include_HEADERS = libcgroup.h libcgroup/error.h libcgroup/init.h \
27 libcgroup/groups.h libcgroup/tasks.h \
28 libcgroup/iterators.h libcgroup/config.h \
29- libcgroup/log.h libcgroup/tools.h
30-
31-if WITH_SYSTEMD
32-nobase_include_HEADERS += libcgroup/systemd.h
33-endif
34+ libcgroup/log.h libcgroup/tools.h libcgroup/systemd.h
35--
362.39.2
37
diff --git a/meta/recipes-core/libcgroup/libcgroup/CVE-2018-14348.patch b/meta/recipes-core/libcgroup/libcgroup/CVE-2018-14348.patch
deleted file mode 100644
index d133703dec..0000000000
--- a/meta/recipes-core/libcgroup/libcgroup/CVE-2018-14348.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From 0d88b73d189ea3440ccaab00418d6469f76fa590 Mon Sep 17 00:00:00 2001
2From: Michal Hocko <mhocko@suse.com>
3Date: Wed, 18 Jul 2018 11:24:29 +0200
4Subject: [PATCH] cgrulesengd: remove umask(0)
5
6One of our partners has noticed that cgred daemon is creating a log file
7(/var/log/cgred) with too wide permissions (0666) and that is seen as
8a security bug because an untrusted user can write to otherwise
9restricted area. CVE-2018-14348 has been assigned to this issue.
10
11CVE: CVE-2018-14348
12Upstream-Status: Backport [https://sourceforge.net/p/libcg/libcg/ci/0d88b73d189ea3440ccaab00418d6469f76fa590]
13
14Signed-off-by: Michal Hocko <mhocko@suse.com>
15Acked-by: Balbir Singh <bsingharora@gmail.com>
16Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
17---
18 src/daemon/cgrulesengd.c | 3 ---
19 1 file changed, 3 deletions(-)
20
21diff --git a/src/daemon/cgrulesengd.c b/src/daemon/cgrulesengd.c
22index ea51f11..0d288f3 100644
23--- a/src/daemon/cgrulesengd.c
24+++ b/src/daemon/cgrulesengd.c
25@@ -889,9 +889,6 @@ int cgre_start_daemon(const char *logp, const int logf,
26 } else if (pid > 0) {
27 exit(EXIT_SUCCESS);
28 }
29-
30- /* Change the file mode mask. */
31- umask(0);
32 } else {
33 flog(LOG_DEBUG, "Not using daemon mode\n");
34 pid = getpid();
35--
362.13.3
37
diff --git a/meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch b/meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch
deleted file mode 100644
index 65f4ef9a55..0000000000
--- a/meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch
+++ /dev/null
@@ -1,235 +0,0 @@
1commit ca780b4f7f71abeeb04a585f2a4d889caaa985fa
2Author: Isaac Dunham <ibid.ag@gmail.com>
3Date: Fri Sep 5 22:35:32 2014 -0700
4
5 Remove __.*DECLS nonsense
6
7Upstream-Status: Pending
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9
10Index: libcgroup-0.41/include/libcgroup/config.h
11===================================================================
12--- libcgroup-0.41.orig/include/libcgroup/config.h
13+++ libcgroup-0.41/include/libcgroup/config.h
14@@ -9,7 +9,9 @@
15 #include <features.h>
16 #endif
17
18-__BEGIN_DECLS
19+#ifdef __cplusplus
20+extern "C" {
21+#endif
22
23 /**
24 * @defgroup group_config 5. Configuration
25@@ -107,6 +109,8 @@ int cgroup_config_create_template_group(
26 * @}
27 * @}
28 */
29-__END_DECLS
30+#ifdef __cplusplus
31+}
32+#endif
33
34 #endif /*_LIBCGROUP_CONFIG_H*/
35Index: libcgroup-0.41/include/libcgroup/error.h
36===================================================================
37--- libcgroup-0.41.orig/include/libcgroup/error.h
38+++ libcgroup-0.41/include/libcgroup/error.h
39@@ -9,7 +9,9 @@
40 #include <features.h>
41 #endif
42
43-__BEGIN_DECLS
44+#ifdef __cplusplus
45+extern "C" {
46+#endif
47
48 /**
49 * @defgroup group_errors 6. Error handling
50@@ -99,6 +101,8 @@ int cgroup_get_last_errno(void);
51 * @}
52 * @}
53 */
54-__END_DECLS
55+#ifdef __cplusplus
56+}
57+#endif
58
59 #endif /* _LIBCGROUP_INIT_H */
60Index: libcgroup-0.41/include/libcgroup/groups.h
61===================================================================
62--- libcgroup-0.41.orig/include/libcgroup/groups.h
63+++ libcgroup-0.41/include/libcgroup/groups.h
64@@ -11,7 +11,9 @@
65 #include <stdbool.h>
66 #endif
67
68-__BEGIN_DECLS
69+#ifdef __cplusplus
70+extern "C" {
71+#endif
72
73 /**
74 * Flags for cgroup_delete_cgroup_ext().
75@@ -577,6 +579,8 @@ char *cgroup_get_cgroup_name(struct cgro
76 */
77
78
79-__END_DECLS
80+#ifdef __cplusplus
81+}
82+#endif
83
84 #endif /* _LIBCGROUP_GROUPS_H */
85Index: libcgroup-0.41/include/libcgroup/init.h
86===================================================================
87--- libcgroup-0.41.orig/include/libcgroup/init.h
88+++ libcgroup-0.41/include/libcgroup/init.h
89@@ -9,7 +9,9 @@
90 #include <features.h>
91 #endif
92
93-__BEGIN_DECLS
94+#ifdef __cplusplus
95+extern "C" {
96+#endif
97
98 /**
99 * @defgroup group_init 1. Initialization
100@@ -58,6 +60,8 @@ int cgroup_get_subsys_mount_point(const
101 * @}
102 * @}
103 */
104-__END_DECLS
105+#ifdef __cplusplus
106+}
107+#endif
108
109 #endif /* _LIBCGROUP_INIT_H */
110Index: libcgroup-0.41/include/libcgroup/iterators.h
111===================================================================
112--- libcgroup-0.41.orig/include/libcgroup/iterators.h
113+++ libcgroup-0.41/include/libcgroup/iterators.h
114@@ -11,7 +11,9 @@
115 #include <features.h>
116 #endif
117
118-__BEGIN_DECLS
119+#ifdef __cplusplus
120+extern "C" {
121+#endif
122
123 /**
124 * @defgroup group_iterators 3. Iterators
125@@ -423,6 +425,8 @@ int cgroup_get_subsys_mount_point_end(vo
126 * @}
127 */
128
129-__END_DECLS
130+#ifdef __cplusplus
131+}
132+#endif
133
134 #endif /* _LIBCGROUP_ITERATORS_H */
135Index: libcgroup-0.41/include/libcgroup/tasks.h
136===================================================================
137--- libcgroup-0.41.orig/include/libcgroup/tasks.h
138+++ libcgroup-0.41/include/libcgroup/tasks.h
139@@ -12,7 +12,9 @@
140 #include <stdbool.h>
141 #endif
142
143-__BEGIN_DECLS
144+#ifdef __cplusplus
145+extern "C" {
146+#endif
147
148 /** Flags for cgroup_change_cgroup_uid_gid(). */
149 enum cgflags {
150@@ -204,6 +206,8 @@ int cgroup_register_unchanged_process(pi
151 * @}
152 * @}
153 */
154-__END_DECLS
155+#ifdef __cplusplus
156+}
157+#endif
158
159 #endif /* _LIBCGROUP_TASKS_H */
160Index: libcgroup-0.41/src/daemon/cgrulesengd.h
161===================================================================
162--- libcgroup-0.41.orig/src/daemon/cgrulesengd.h
163+++ libcgroup-0.41/src/daemon/cgrulesengd.h
164@@ -17,7 +17,9 @@
165
166 #include <features.h>
167
168-__BEGIN_DECLS
169+#ifdef __cplusplus
170+extern "C" {
171+#endif
172
173 #include "config.h"
174 #include "libcgroup.h"
175@@ -119,7 +121,9 @@ void cgre_flash_templates(int signum);
176 */
177 void cgre_catch_term(int signum);
178
179-__END_DECLS
180+#ifdef __cplusplus
181+}
182+#endif
183
184 #endif /* _CGRULESENGD_H */
185
186Index: libcgroup-0.41/src/libcgroup-internal.h
187===================================================================
188--- libcgroup-0.41.orig/src/libcgroup-internal.h
189+++ libcgroup-0.41/src/libcgroup-internal.h
190@@ -16,7 +16,9 @@
191
192 #define __LIBCG_INTERNAL
193
194-__BEGIN_DECLS
195+#ifdef __cplusplus
196+extern "C" {
197+#endif
198
199 #include "config.h"
200 #include <fts.h>
201@@ -279,6 +281,8 @@ extern void cgroup_dictionary_iterator_e
202 */
203 int cg_chmod_path(const char *path, mode_t mode, int owner_is_umask);
204
205-__END_DECLS
206+#ifdef __cplusplus
207+}
208+#endif
209
210 #endif
211Index: libcgroup-0.41/include/libcgroup/log.h
212===================================================================
213--- libcgroup-0.41.orig/include/libcgroup/log.h
214+++ libcgroup-0.41/include/libcgroup/log.h
215@@ -11,7 +11,9 @@
216
217 #include <stdarg.h>
218
219-__BEGIN_DECLS
220+#ifdef __cplusplus
221+extern "C" {
222+#endif
223
224 /**
225 * @defgroup group_log 7. Logging
226@@ -142,6 +144,8 @@ extern int cgroup_parse_log_level_str(co
227 * @}
228 * @}
229 */
230-__END_DECLS
231+#ifdef __cplusplus
232+}
233+#endif
234
235 #endif /* _LIBCGROUP_LOG_H */