summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch')
-rw-r--r--meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch43
1 files changed, 0 insertions, 43 deletions
diff --git a/meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch b/meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch
deleted file mode 100644
index 31024bd7e8..0000000000
--- a/meta/recipes-devtools/rpm/files/0001-Make-configure-cope-with-multiple-users-groups-with-.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1Upstream-Status: Backport [https://github.com/rpm-software-management/rpm/commit/a3652af66fa2a1f272d771323fee019f23d350f5]
2
3From 68a7b60f89419e53a4bd3c412f816f0576ffd8c4 Mon Sep 17 00:00:00 2001
4From: Mike Crowe <mac@mcrowe.com>
5Date: Thu, 4 Jan 2018 14:39:51 +0000
6Subject: [PATCH] Make configure cope with multiple users/groups with ID 0
7
8If /etc/passwd contains multiple users with UID 0 then user_with_uid0 will
9contain a line feed which results in config.h containing:
10
11 #define UID_0_USER "root
12
13(i.e. without a closing quote.)
14
15The same problem occurs with /etc/group.
16
17Let's only emit the first match in each case so that there is only ever a
18single result.
19
20Signed-off-by: Mike Crowe <mac@mcrowe.com>
21
22---
23 configure.ac | 4 ++--
24 1 file changed, 2 insertions(+), 2 deletions(-)
25
26diff --git a/configure.ac b/configure.ac
27index ab8ca4f54..5259ad243 100644
28--- a/configure.ac
29+++ b/configure.ac
30@@ -996,8 +996,8 @@ if test "$with_dmalloc" = yes ; then
31 LIBS="$LIBS -ldmalloc"
32 fi
33
34-user_with_uid0=$(awk -F: '$3==0 {print $1}' /etc/passwd)
35-group_with_gid0=$(awk -F: '$3==0 {print $1}' /etc/group)
36+user_with_uid0=$(awk -F: '$3==0 {print $1;exit}' /etc/passwd)
37+group_with_gid0=$(awk -F: '$3==0 {print $1;exit}' /etc/group)
38 AC_DEFINE_UNQUOTED([UID_0_USER],["$user_with_uid0"],[Get the user name having userid 0])
39 AC_DEFINE_UNQUOTED([GID_0_GROUP],["$group_with_gid0"],[Get the group name having groupid 0])
40
41--
422.11.0
43