summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2016-04-14 13:36:39 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-15 06:59:43 +0100
commit7c5823ac328eae7479c5bcf71b7cbf507a95ac6d (patch)
treeaec4c89a9c5449d2d45fc84d5409401837454faf /meta
parent60a8719e6eca525c5b6cafd3d02c9ca419309460 (diff)
downloadpoky-7c5823ac328eae7479c5bcf71b7cbf507a95ac6d.tar.gz
shadow: Disable syslog for more commands
When building shadow-native, syslog was disabled for useradd and groupadd. This disables it also for groupdel, groupmems, groupmod, userdel and usermod (i.e., the use of syslog is now disabled for all commands supported by useradd_base.bbclass). (From OE-Core rev: 0791ba7ea82444729a1a7d1b2443f633bcba2002) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch124
-rw-r--r--meta/recipes-extended/shadow/files/disable-syslog.patch34
-rw-r--r--meta/recipes-extended/shadow/shadow.inc4
3 files changed, 126 insertions, 36 deletions
diff --git a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
new file mode 100644
index 0000000000..a6f604b652
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
@@ -0,0 +1,124 @@
1From 8cf3454d567f77233023be49a39a33e9f0836f89 Mon Sep 17 00:00:00 2001
2From: Scott Garman <scott.a.garman@intel.com>
3Date: Thu, 14 Apr 2016 12:28:57 +0200
4Subject: [PATCH] Disable use of syslog for sysroot
5
6Disable use of syslog to prevent sysroot user and group additions from
7writing entries to the host's syslog. This patch should only be used
8with the shadow-native recipe.
9
10Upstream-Status: Inappropriate [disable feature]
11
12Signed-off-by: Scott Garman <scott.a.garman@intel.com>
13Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
14---
15 src/groupadd.c | 3 +++
16 src/groupdel.c | 3 +++
17 src/groupmems.c | 3 +++
18 src/groupmod.c | 3 +++
19 src/useradd.c | 3 +++
20 src/userdel.c | 3 +++
21 src/usermod.c | 3 +++
22 7 files changed, 21 insertions(+)
23
24diff --git a/src/groupadd.c b/src/groupadd.c
25index 39b4ec0..f716f57 100644
26--- a/src/groupadd.c
27+++ b/src/groupadd.c
28@@ -34,6 +34,9 @@
29
30 #ident "$Id$"
31
32+/* Disable use of syslog since we're running this command against a sysroot */
33+#undef USE_SYSLOG
34+
35 #include <ctype.h>
36 #include <fcntl.h>
37 #include <getopt.h>
38diff --git a/src/groupdel.c b/src/groupdel.c
39index da99347..46a679c 100644
40--- a/src/groupdel.c
41+++ b/src/groupdel.c
42@@ -34,6 +34,9 @@
43
44 #ident "$Id$"
45
46+/* Disable use of syslog since we're running this command against a sysroot */
47+#undef USE_SYSLOG
48+
49 #include <ctype.h>
50 #include <fcntl.h>
51 #include <grp.h>
52diff --git a/src/groupmems.c b/src/groupmems.c
53index e4f107f..95cb073 100644
54--- a/src/groupmems.c
55+++ b/src/groupmems.c
56@@ -32,6 +32,9 @@
57
58 #include <config.h>
59
60+/* Disable use of syslog since we're running this command against a sysroot */
61+#undef USE_SYSLOG
62+
63 #include <fcntl.h>
64 #include <getopt.h>
65 #include <grp.h>
66diff --git a/src/groupmod.c b/src/groupmod.c
67index d9d3807..6229737 100644
68--- a/src/groupmod.c
69+++ b/src/groupmod.c
70@@ -34,6 +34,9 @@
71
72 #ident "$Id$"
73
74+/* Disable use of syslog since we're running this command against a sysroot */
75+#undef USE_SYSLOG
76+
77 #include <ctype.h>
78 #include <fcntl.h>
79 #include <getopt.h>
80diff --git a/src/useradd.c b/src/useradd.c
81index e1ebf50..25679d8 100644
82--- a/src/useradd.c
83+++ b/src/useradd.c
84@@ -34,6 +34,9 @@
85
86 #ident "$Id$"
87
88+/* Disable use of syslog since we're running this command against a sysroot */
89+#undef USE_SYSLOG
90+
91 #include <assert.h>
92 #include <ctype.h>
93 #include <errno.h>
94diff --git a/src/userdel.c b/src/userdel.c
95index 19b12bc..a083929 100644
96--- a/src/userdel.c
97+++ b/src/userdel.c
98@@ -34,6 +34,9 @@
99
100 #ident "$Id$"
101
102+/* Disable use of syslog since we're running this command against a sysroot */
103+#undef USE_SYSLOG
104+
105 #include <errno.h>
106 #include <fcntl.h>
107 #include <getopt.h>
108diff --git a/src/usermod.c b/src/usermod.c
109index 685b50a..28e5cfc 100644
110--- a/src/usermod.c
111+++ b/src/usermod.c
112@@ -34,6 +34,9 @@
113
114 #ident "$Id$"
115
116+/* Disable use of syslog since we're running this command against a sysroot */
117+#undef USE_SYSLOG
118+
119 #include <ctype.h>
120 #include <errno.h>
121 #include <fcntl.h>
122--
1232.1.0
124
diff --git a/meta/recipes-extended/shadow/files/disable-syslog.patch b/meta/recipes-extended/shadow/files/disable-syslog.patch
deleted file mode 100644
index 1943fd6faf..0000000000
--- a/meta/recipes-extended/shadow/files/disable-syslog.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1Disable use of syslog to prevent sysroot user and group additions from
2writing entries to the host's syslog. This patch should only be used
3with the shadow-native recipe.
4
5Upstream-Status: Inappropriate [disable feature]
6
7Signed-off-by: Scott Garman <scott.a.garman@intel.com>
8
9diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3/src/groupadd.c
10--- shadow-4.1.4.3.orig//src/groupadd.c 2011-02-13 09:58:16.000000000 -0800
11+++ shadow-4.1.4.3/src/groupadd.c 2012-04-05 10:05:59.440001758 -0700
12@@ -34,6 +34,9 @@
13
14 #ident "$Id: groupadd.c 3015 2009-06-05 22:16:56Z nekral-guest $"
15
16+/* Disable use of syslog since we're running this command against a sysroot */
17+#undef USE_SYSLOG
18+
19 #include <ctype.h>
20 #include <fcntl.h>
21 #include <getopt.h>
22diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3/src/useradd.c
23--- shadow-4.1.4.3.orig//src/useradd.c 2011-02-13 09:58:16.000000000 -0800
24+++ shadow-4.1.4.3/src/useradd.c 2012-04-05 10:06:25.076001315 -0700
25@@ -34,6 +34,9 @@
26
27 #ident "$Id: useradd.c 3015 2009-06-05 22:16:56Z nekral-guest $"
28
29+/* Disable use of syslog since we're running this command against a sysroot */
30+#undef USE_SYSLOG
31+
32 #include <assert.h>
33 #include <ctype.h>
34 #include <errno.h>
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index 4313ffe952..d024b01dcb 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -25,13 +25,13 @@ SRC_URI_append_class-target = " \
25 " 25 "
26 26
27SRC_URI_append_class-native = " \ 27SRC_URI_append_class-native = " \
28 file://disable-syslog.patch \ 28 file://0001-Disable-use-of-syslog-for-sysroot.patch \
29 file://allow-for-setting-password-in-clear-text.patch \ 29 file://allow-for-setting-password-in-clear-text.patch \
30 file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \ 30 file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \
31 file://0001-useradd.c-create-parent-directories-when-necessary.patch \ 31 file://0001-useradd.c-create-parent-directories-when-necessary.patch \
32 " 32 "
33SRC_URI_append_class-nativesdk = " \ 33SRC_URI_append_class-nativesdk = " \
34 file://disable-syslog.patch \ 34 file://0001-Disable-use-of-syslog-for-sysroot.patch \
35 " 35 "
36 36
37SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8" 37SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8"