From 8f1816862b884f226c0ce7f5c89fd75b6791c007 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 14 Mar 2022 17:53:29 +0000 Subject: shadow-native: Simplify and fix syslog disable patch Shadow is happily spamming the host syslog with messages and shouldn't be which suggests the patch isn't working. Redo it to work at the configure level which is simpler and hopefully more effective. Signed-off-by: Richard Purdie --- .../0001-Disable-use-of-syslog-for-sysroot.patch | 134 +++------------------ 1 file changed, 16 insertions(+), 118 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 index 4d6f6d68ec..4bb6be43ed 100644 --- 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 @@ -1,124 +1,22 @@ -From 531cd5ca6eadef29b4799459f1bcfc002ecbd424 Mon Sep 17 00:00:00 2001 -From: Scott Garman -Date: Thu, 14 Apr 2016 12:28:57 +0200 -Subject: [PATCH] Disable use of syslog for sysroot +Disable use of syslog for shadow-native tools Disable use of syslog to prevent sysroot user and group additions from writing entries to the host's syslog. This patch should only be used with the shadow-native recipe. -Upstream-Status: Inappropriate [disable feature] +Upstream-Status: Inappropriate [OE specific configuration] +Signed-off-by: Richard Purdie -Signed-off-by: Scott Garman -Signed-off-by: Peter Kjellerstedt -Signed-off-by: Chen Qi - ---- - src/groupadd.c | 3 +++ - src/groupdel.c | 3 +++ - src/groupmems.c | 3 +++ - src/groupmod.c | 3 +++ - src/useradd.c | 3 +++ - src/userdel.c | 4 ++++ - src/usermod.c | 3 +++ - 7 files changed, 22 insertions(+) - -diff --git a/src/groupadd.c b/src/groupadd.c -index 66ccb53..776ea51 100644 ---- a/src/groupadd.c -+++ b/src/groupadd.c -@@ -11,6 +11,9 @@ - - #ident "$Id$" - -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include -diff --git a/src/groupdel.c b/src/groupdel.c -index c84faa7..1076f4b 100644 ---- a/src/groupdel.c -+++ b/src/groupdel.c -@@ -11,6 +11,9 @@ - - #ident "$Id$" - -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include -diff --git a/src/groupmems.c b/src/groupmems.c -index a0e3266..6540cb1 100644 ---- a/src/groupmems.c -+++ b/src/groupmems.c -@@ -9,6 +9,9 @@ - - #include - -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include -diff --git a/src/groupmod.c b/src/groupmod.c -index 006eca1..78b1ad6 100644 ---- a/src/groupmod.c -+++ b/src/groupmod.c -@@ -11,6 +11,9 @@ - - #ident "$Id$" - -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include -diff --git a/src/useradd.c b/src/useradd.c -index 456b9de..2b0d703 100644 ---- a/src/useradd.c -+++ b/src/useradd.c -@@ -11,6 +11,9 @@ - - #ident "$Id$" - -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include -diff --git a/src/userdel.c b/src/userdel.c -index 7012b0e..08bb5d1 100644 ---- a/src/userdel.c -+++ b/src/userdel.c -@@ -8,6 +8,10 @@ - */ - - #include -+ -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include -diff --git a/src/usermod.c b/src/usermod.c -index 9473a7d..7d4f7b5 100644 ---- a/src/usermod.c -+++ b/src/usermod.c -@@ -11,6 +11,9 @@ - - #ident "$Id$" - -+/* Disable use of syslog since we're running this command against a sysroot */ -+#undef USE_SYSLOG -+ - #include - #include - #include +Index: shadow-4.11.1/configure.ac +=================================================================== +--- shadow-4.11.1.orig/configure.ac ++++ shadow-4.11.1/configure.ac +@@ -204,7 +204,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$sha + [Path to passwd program.]) + + dnl XXX - quick hack, should disappear before anyone notices :). +-AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().]) ++AC_DEFINE(USE_SYSLOG, 0, [Define to use syslog().]) + if test "$ac_cv_func_ruserok" = "yes"; then + AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.]) + AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).]) -- cgit 1.2.3-korg