summaryrefslogtreecommitdiffstats
path: root/meta-gnome
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2019-08-18 18:07:48 +0300
committerKhem Raj <raj.khem@gmail.com>2019-08-18 21:47:18 -0700
commitea133eab3f8fcaf01fa8427ce29baf54fa75a40d (patch)
treea5be3af33dcf0789efaba51ccc8adaf5a6f7b21a /meta-gnome
parentdb9ca7d7c37a69d49055fa826289586a1434401c (diff)
downloadmeta-openembedded-ea133eab3f8fcaf01fa8427ce29baf54fa75a40d.tar.gz
libuser: musl now supports secure_getenv
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-gnome')
-rw-r--r--meta-gnome/recipes-support/libuser/libuser/0001-Check-for-issetugid.patch62
-rw-r--r--meta-gnome/recipes-support/libuser/libuser_0.62.bb1
2 files changed, 0 insertions, 63 deletions
diff --git a/meta-gnome/recipes-support/libuser/libuser/0001-Check-for-issetugid.patch b/meta-gnome/recipes-support/libuser/libuser/0001-Check-for-issetugid.patch
deleted file mode 100644
index 79756b9a0..000000000
--- a/meta-gnome/recipes-support/libuser/libuser/0001-Check-for-issetugid.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1From d0537cb7f2dc5877700ad78dfd191515379d4edc Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 7 Jan 2016 02:22:51 +0000
4Subject: [PATCH 1/2] Check for issetugid()
5
6If secure version of getenv is not there then we can use
7issetugid() as aid to call getenv()
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Pending
12
13 configure.ac | 1 +
14 lib/config.c | 12 +++++++++++-
15 2 files changed, 12 insertions(+), 1 deletion(-)
16
17diff --git a/configure.ac b/configure.ac
18index 1ded1a2..ee19e1f 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -125,6 +125,7 @@ AC_TYPE_OFF_T
22 AC_TYPE_SIZE_T
23
24 AC_CHECK_FUNCS([__secure_getenv secure_getenv])
25+AC_CHECK_FUNCS([issetugid])
26
27 # Modify CFLAGS after all tests are run (some of them could fail because
28 # of the -Werror).
29diff --git a/lib/config.c b/lib/config.c
30index 29e7120..30f9daf 100644
31--- a/lib/config.c
32+++ b/lib/config.c
33@@ -44,8 +44,10 @@
34 # define safe_getenv(string) secure_getenv(string)
35 #elif defined(HAVE___SECURE_GETENV)
36 # define safe_getenv(string) __secure_getenv(string)
37+#elif defined(HAVE_ISSETUGID)
38+# define safe_getenv(string) safe_getenv_issetugid(string)
39 #else
40-# error Neither secure_getenv not __secure_getenv are available
41+# error None of secure_getenv, __secure_getenv, or issetugid is available
42 #endif
43
44 struct config_config {
45@@ -59,6 +61,14 @@ struct config_key {
46 GList *values;
47 };
48
49+static const char*
50+safe_getenv_issetugid(const char* name)
51+{
52+ if (issetugid ())
53+ return 0;
54+ return getenv (name);
55+}
56+
57 /* Compare two section names */
58 static int
59 compare_section_names(gconstpointer a, gconstpointer b)
60--
612.7.0
62
diff --git a/meta-gnome/recipes-support/libuser/libuser_0.62.bb b/meta-gnome/recipes-support/libuser/libuser_0.62.bb
index 7ec54eb16..74053e451 100644
--- a/meta-gnome/recipes-support/libuser/libuser_0.62.bb
+++ b/meta-gnome/recipes-support/libuser/libuser_0.62.bb
@@ -12,7 +12,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
12SECTION = "base" 12SECTION = "base"
13 13
14SRC_URI = "https://releases.pagure.org/libuser/libuser-${PV}.tar.xz \ 14SRC_URI = "https://releases.pagure.org/libuser/libuser-${PV}.tar.xz \
15 file://0001-Check-for-issetugid.patch \
16 file://0002-remove-unused-execinfo.h.patch \ 15 file://0002-remove-unused-execinfo.h.patch \
17 file://0001-modules-files.c-parse_field-fix-string-formating-in-.patch \ 16 file://0001-modules-files.c-parse_field-fix-string-formating-in-.patch \
18 " 17 "