Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 1 | From 30a3906a0a21120fa6bbc918b6258ab9303fbeaa Mon Sep 17 00:00:00 2001 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2 | From: Scott Garman <scott.a.garman@intel.com> |
| 3 | Date: Thu, 14 Apr 2016 12:28:57 +0200 |
| 4 | Subject: [PATCH] Disable use of syslog for sysroot |
| 5 | |
| 6 | Disable use of syslog to prevent sysroot user and group additions from |
| 7 | writing entries to the host's syslog. This patch should only be used |
| 8 | with the shadow-native recipe. |
| 9 | |
| 10 | Upstream-Status: Inappropriate [disable feature] |
| 11 | |
| 12 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> |
| 13 | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 14 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 15 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 16 | --- |
| 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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 22 | src/userdel.c | 4 ++++ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 23 | src/usermod.c | 3 +++ |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 24 | 7 files changed, 22 insertions(+) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 25 | |
| 26 | diff --git a/src/groupadd.c b/src/groupadd.c |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 27 | index d7f68b1..5fe5f43 100644 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 28 | --- a/src/groupadd.c |
| 29 | +++ b/src/groupadd.c |
| 30 | @@ -34,6 +34,9 @@ |
| 31 | |
| 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> |
| 40 | diff --git a/src/groupdel.c b/src/groupdel.c |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 41 | index 5c89312..2aefc5a 100644 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 42 | --- a/src/groupdel.c |
| 43 | +++ b/src/groupdel.c |
| 44 | @@ -34,6 +34,9 @@ |
| 45 | |
| 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> |
| 54 | diff --git a/src/groupmems.c b/src/groupmems.c |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 55 | index 654a8f3..6b2026b 100644 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 56 | --- a/src/groupmems.c |
| 57 | +++ b/src/groupmems.c |
| 58 | @@ -32,6 +32,9 @@ |
| 59 | |
| 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> |
| 68 | diff --git a/src/groupmod.c b/src/groupmod.c |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 69 | index acd6f35..a2c5247 100644 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 70 | --- a/src/groupmod.c |
| 71 | +++ b/src/groupmod.c |
| 72 | @@ -34,6 +34,9 @@ |
| 73 | |
| 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> |
| 82 | diff --git a/src/useradd.c b/src/useradd.c |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 83 | index 127177e..b80e505 100644 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 84 | --- a/src/useradd.c |
| 85 | +++ b/src/useradd.c |
| 86 | @@ -34,6 +34,9 @@ |
| 87 | |
| 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> |
| 96 | diff --git a/src/userdel.c b/src/userdel.c |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 97 | index 79a7c89..c1e010a 100644 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 98 | --- a/src/userdel.c |
| 99 | +++ b/src/userdel.c |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 100 | @@ -31,6 +31,10 @@ |
| 101 | */ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 102 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 103 | #include <config.h> |
| 104 | + |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 105 | +/* Disable use of syslog since we're running this command against a sysroot */ |
| 106 | +#undef USE_SYSLOG |
| 107 | + |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 108 | #include <assert.h> |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 109 | #include <dirent.h> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 110 | #include <errno.h> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 111 | diff --git a/src/usermod.c b/src/usermod.c |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 112 | index 03bb9b9..e15fdd4 100644 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 113 | --- a/src/usermod.c |
| 114 | +++ b/src/usermod.c |
| 115 | @@ -34,6 +34,9 @@ |
| 116 | |
| 117 | #ident "$Id$" |
| 118 | |
| 119 | +/* Disable use of syslog since we're running this command against a sysroot */ |
| 120 | +#undef USE_SYSLOG |
| 121 | + |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 122 | #include <assert.h> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 123 | #include <ctype.h> |
| 124 | #include <errno.h> |