diff options
| -rw-r--r-- | meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch | 150 |
1 files changed, 39 insertions, 111 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 95728bcd3f..628db42136 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,52 @@ | |||
| 1 | From 30a3906a0a21120fa6bbc918b6258ab9303fbeaa Mon Sep 17 00:00:00 2001 | 1 | From 8b845fff891798a03bdf21354b52e4487c2c0200 Mon Sep 17 00:00:00 2001 |
| 2 | From: Scott Garman <scott.a.garman@intel.com> | 2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 3 | Date: Thu, 14 Apr 2016 12:28:57 +0200 | 3 | Date: Thu, 14 Apr 2022 23:11:53 +0000 |
| 4 | Subject: [PATCH] Disable use of syslog for sysroot | 4 | Subject: [PATCH] Disable use of syslog for shadow-native tools |
| 5 | 5 | ||
| 6 | Disable use of syslog to prevent sysroot user and group additions from | 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 | 7 | writing entries to the host's syslog. This patch should only be used |
| 8 | with the shadow-native recipe. | 8 | with the shadow-native recipe. |
| 9 | 9 | ||
| 10 | Upstream-Status: Inappropriate [disable feature] | 10 | Upstream-Status: Inappropriate [OE specific configuration] |
| 11 | 11 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | |
| 12 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
| 13 | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 12 | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> |
| 14 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 15 | 13 | ||
| 16 | --- | 14 | --- |
| 17 | src/groupadd.c | 3 +++ | 15 | configure.ac | 2 +- |
| 18 | src/groupdel.c | 3 +++ | 16 | src/login_nopam.c | 3 ++- |
| 19 | src/groupmems.c | 3 +++ | 17 | 2 files changed, 3 insertions(+), 2 deletions(-) |
| 20 | src/groupmod.c | 3 +++ | ||
| 21 | src/useradd.c | 3 +++ | ||
| 22 | src/userdel.c | 4 ++++ | ||
| 23 | src/usermod.c | 3 +++ | ||
| 24 | 7 files changed, 22 insertions(+) | ||
| 25 | 18 | ||
| 26 | diff --git a/src/groupadd.c b/src/groupadd.c | 19 | diff --git a/configure.ac b/configure.ac |
| 27 | index d7f68b1..5fe5f43 100644 | 20 | index 5dcae19..b2c58f5 100644 |
| 28 | --- a/src/groupadd.c | 21 | --- a/configure.ac |
| 29 | +++ b/src/groupadd.c | 22 | +++ b/configure.ac |
| 30 | @@ -34,6 +34,9 @@ | 23 | @@ -204,7 +204,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd", |
| 31 | 24 | [Path to passwd program.]) | |
| 32 | #ident "$Id$" | 25 | |
| 33 | 26 | dnl XXX - quick hack, should disappear before anyone notices :). | |
| 34 | +/* Disable use of syslog since we're running this command against a sysroot */ | 27 | -AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().]) |
| 35 | +#undef USE_SYSLOG | 28 | +#AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().]) |
| 36 | + | 29 | if test "$ac_cv_func_ruserok" = "yes"; then |
| 37 | #include <ctype.h> | 30 | AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.]) |
| 38 | #include <fcntl.h> | 31 | AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).]) |
| 39 | #include <getopt.h> | 32 | diff --git a/src/login_nopam.c b/src/login_nopam.c |
| 40 | diff --git a/src/groupdel.c b/src/groupdel.c | 33 | index df6ba88..fc24e13 100644 |
| 41 | index 5c89312..2aefc5a 100644 | 34 | --- a/src/login_nopam.c |
| 42 | --- a/src/groupdel.c | 35 | +++ b/src/login_nopam.c |
| 43 | +++ b/src/groupdel.c | 36 | @@ -29,7 +29,6 @@ |
| 44 | @@ -34,6 +34,9 @@ | 37 | #ifndef USE_PAM |
| 45 | |||
| 46 | #ident "$Id$" | 38 | #ident "$Id$" |
| 47 | 39 | ||
| 48 | +/* Disable use of syslog since we're running this command against a sysroot */ | 40 | -#include "prototypes.h" |
| 49 | +#undef USE_SYSLOG | 41 | /* |
| 50 | + | 42 | * This module implements a simple but effective form of login access |
| 51 | #include <ctype.h> | 43 | * control based on login names and on host (or domain) names, internet |
| 52 | #include <fcntl.h> | 44 | @@ -57,6 +56,8 @@ |
| 53 | #include <grp.h> | 45 | #include <netinet/in.h> |
| 54 | diff --git a/src/groupmems.c b/src/groupmems.c | 46 | #include <arpa/inet.h> /* for inet_ntoa() */ |
| 55 | index 654a8f3..6b2026b 100644 | ||
| 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 | ||
| 69 | index acd6f35..a2c5247 100644 | ||
| 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 | ||
| 83 | index 127177e..b80e505 100644 | ||
| 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 | ||
| 97 | index 79a7c89..c1e010a 100644 | ||
| 98 | --- a/src/userdel.c | ||
| 99 | +++ b/src/userdel.c | ||
| 100 | @@ -31,6 +31,10 @@ | ||
| 101 | */ | ||
| 102 | |||
| 103 | #include <config.h> | ||
| 104 | + | ||
| 105 | +/* Disable use of syslog since we're running this command against a sysroot */ | ||
| 106 | +#undef USE_SYSLOG | ||
| 107 | + | ||
| 108 | #include <assert.h> | ||
| 109 | #include <dirent.h> | ||
| 110 | #include <errno.h> | ||
| 111 | diff --git a/src/usermod.c b/src/usermod.c | ||
| 112 | index 03bb9b9..e15fdd4 100644 | ||
| 113 | --- a/src/usermod.c | ||
| 114 | +++ b/src/usermod.c | ||
| 115 | @@ -34,6 +34,9 @@ | ||
| 116 | |||
| 117 | #ident "$Id$" | ||
| 118 | 47 | ||
| 119 | +/* Disable use of syslog since we're running this command against a sysroot */ | 48 | +#include "prototypes.h" |
| 120 | +#undef USE_SYSLOG | ||
| 121 | + | 49 | + |
| 122 | #include <assert.h> | 50 | #if !defined(MAXHOSTNAMELEN) || (MAXHOSTNAMELEN < 64) |
| 123 | #include <ctype.h> | 51 | #undef MAXHOSTNAMELEN |
| 124 | #include <errno.h> | 52 | #define MAXHOSTNAMELEN 256 |
