blob: 4d6f6d68ec2a2b7ea91afe465f70ce0cc9e9d8ed [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001From 531cd5ca6eadef29b4799459f1bcfc002ecbd424 Mon Sep 17 00:00:00 2001
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05002From: 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>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Andrew Geissler82c905d2020-04-13 13:39:40 -050015
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050016---
17 src/groupadd.c | 3 +++
18 src/groupdel.c | 3 +++
19 src/groupmems.c | 3 +++
20 src/groupmod.c | 3 +++
21 src/useradd.c | 3 +++
Patrick Williams213cb262021-08-07 19:21:33 -050022 src/userdel.c | 4 ++++
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050023 src/usermod.c | 3 +++
Patrick Williams213cb262021-08-07 19:21:33 -050024 7 files changed, 22 insertions(+)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050025
26diff --git a/src/groupadd.c b/src/groupadd.c
Andrew Geissler595f6302022-01-24 19:11:47 +000027index 66ccb53..776ea51 100644
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050028--- a/src/groupadd.c
29+++ b/src/groupadd.c
Andrew Geissler595f6302022-01-24 19:11:47 +000030@@ -11,6 +11,9 @@
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050031
32 #ident "$Id$"
33
34+/* Disable use of syslog since we're running this command against a sysroot */
35+#undef USE_SYSLOG
36+
37 #include <ctype.h>
38 #include <fcntl.h>
39 #include <getopt.h>
40diff --git a/src/groupdel.c b/src/groupdel.c
Andrew Geissler595f6302022-01-24 19:11:47 +000041index c84faa7..1076f4b 100644
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050042--- a/src/groupdel.c
43+++ b/src/groupdel.c
Andrew Geissler595f6302022-01-24 19:11:47 +000044@@ -11,6 +11,9 @@
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050045
46 #ident "$Id$"
47
48+/* Disable use of syslog since we're running this command against a sysroot */
49+#undef USE_SYSLOG
50+
51 #include <ctype.h>
52 #include <fcntl.h>
53 #include <grp.h>
54diff --git a/src/groupmems.c b/src/groupmems.c
Andrew Geissler595f6302022-01-24 19:11:47 +000055index a0e3266..6540cb1 100644
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050056--- a/src/groupmems.c
57+++ b/src/groupmems.c
Andrew Geissler595f6302022-01-24 19:11:47 +000058@@ -9,6 +9,9 @@
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050059
60 #include <config.h>
61
62+/* Disable use of syslog since we're running this command against a sysroot */
63+#undef USE_SYSLOG
64+
65 #include <fcntl.h>
66 #include <getopt.h>
67 #include <grp.h>
68diff --git a/src/groupmod.c b/src/groupmod.c
Andrew Geissler595f6302022-01-24 19:11:47 +000069index 006eca1..78b1ad6 100644
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050070--- a/src/groupmod.c
71+++ b/src/groupmod.c
Andrew Geissler595f6302022-01-24 19:11:47 +000072@@ -11,6 +11,9 @@
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050073
74 #ident "$Id$"
75
76+/* Disable use of syslog since we're running this command against a sysroot */
77+#undef USE_SYSLOG
78+
79 #include <ctype.h>
80 #include <fcntl.h>
81 #include <getopt.h>
82diff --git a/src/useradd.c b/src/useradd.c
Andrew Geissler595f6302022-01-24 19:11:47 +000083index 456b9de..2b0d703 100644
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050084--- a/src/useradd.c
85+++ b/src/useradd.c
Andrew Geissler595f6302022-01-24 19:11:47 +000086@@ -11,6 +11,9 @@
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050087
88 #ident "$Id$"
89
90+/* Disable use of syslog since we're running this command against a sysroot */
91+#undef USE_SYSLOG
92+
93 #include <assert.h>
94 #include <ctype.h>
95 #include <errno.h>
96diff --git a/src/userdel.c b/src/userdel.c
Andrew Geissler595f6302022-01-24 19:11:47 +000097index 7012b0e..08bb5d1 100644
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050098--- a/src/userdel.c
99+++ b/src/userdel.c
Andrew Geissler595f6302022-01-24 19:11:47 +0000100@@ -8,6 +8,10 @@
Patrick Williams213cb262021-08-07 19:21:33 -0500101 */
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500102
Patrick Williams213cb262021-08-07 19:21:33 -0500103 #include <config.h>
104+
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500105+/* Disable use of syslog since we're running this command against a sysroot */
106+#undef USE_SYSLOG
107+
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800108 #include <assert.h>
Patrick Williams213cb262021-08-07 19:21:33 -0500109 #include <dirent.h>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500110 #include <errno.h>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500111diff --git a/src/usermod.c b/src/usermod.c
Andrew Geissler595f6302022-01-24 19:11:47 +0000112index 9473a7d..7d4f7b5 100644
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500113--- a/src/usermod.c
114+++ b/src/usermod.c
Andrew Geissler595f6302022-01-24 19:11:47 +0000115@@ -11,6 +11,9 @@
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500116
117 #ident "$Id$"
118
119+/* Disable use of syslog since we're running this command against a sysroot */
120+#undef USE_SYSLOG
121+
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800122 #include <assert.h>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500123 #include <ctype.h>
124 #include <errno.h>