summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2022-04-15 01:34:02 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-15 17:30:34 +0100
commit24c743fe66cd78ecf8facaf6de8584d7513a03ee (patch)
treeb437f40e92b3336839a37acadab8a1096e704705 /meta/recipes-extended/shadow
parentaf5cb9d6fedf5efc2e122cc27e29d2009976bdab (diff)
downloadpoky-24c743fe66cd78ecf8facaf6de8584d7513a03ee.tar.gz
shadow: Disable the use of syslog() for the native tools
An attempt to disable the use of syslog() was made in commit 8f181686 (shadow-native: Simplify and fix syslog disable patch). However, because the code checks if USE_SYSLOG is defined rather than checking if it evaluates to TRUE the patch did not work as intended. (From OE-Core rev: e1f21d0d3385f9d9f4316bf0039b287fd4b37fc8) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/shadow')
-rw-r--r--meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch44
1 files changed, 37 insertions, 7 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 4bb6be43ed..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,4 +1,7 @@
1Disable use of syslog for shadow-native tools 1From 8b845fff891798a03bdf21354b52e4487c2c0200 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Thu, 14 Apr 2022 23:11:53 +0000
4Subject: [PATCH] Disable use of syslog for shadow-native tools
2 5
3Disable use of syslog to prevent sysroot user and group additions from 6Disable use of syslog to prevent sysroot user and group additions from
4writing entries to the host's syslog. This patch should only be used 7writing entries to the host's syslog. This patch should only be used
@@ -6,17 +9,44 @@ with the shadow-native recipe.
6 9
7Upstream-Status: Inappropriate [OE specific configuration] 10Upstream-Status: Inappropriate [OE specific configuration]
8Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 11Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
9 13
10Index: shadow-4.11.1/configure.ac 14---
11=================================================================== 15 configure.ac | 2 +-
12--- shadow-4.11.1.orig/configure.ac 16 src/login_nopam.c | 3 ++-
13+++ shadow-4.11.1/configure.ac 17 2 files changed, 3 insertions(+), 2 deletions(-)
14@@ -204,7 +204,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$sha 18
19diff --git a/configure.ac b/configure.ac
20index 5dcae19..b2c58f5 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -204,7 +204,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd",
15 [Path to passwd program.]) 24 [Path to passwd program.])
16 25
17 dnl XXX - quick hack, should disappear before anyone notices :). 26 dnl XXX - quick hack, should disappear before anyone notices :).
18-AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().]) 27-AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().])
19+AC_DEFINE(USE_SYSLOG, 0, [Define to use syslog().]) 28+#AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().])
20 if test "$ac_cv_func_ruserok" = "yes"; then 29 if test "$ac_cv_func_ruserok" = "yes"; then
21 AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.]) 30 AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.])
22 AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).]) 31 AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).])
32diff --git a/src/login_nopam.c b/src/login_nopam.c
33index df6ba88..fc24e13 100644
34--- a/src/login_nopam.c
35+++ b/src/login_nopam.c
36@@ -29,7 +29,6 @@
37 #ifndef USE_PAM
38 #ident "$Id$"
39
40-#include "prototypes.h"
41 /*
42 * This module implements a simple but effective form of login access
43 * control based on login names and on host (or domain) names, internet
44@@ -57,6 +56,8 @@
45 #include <netinet/in.h>
46 #include <arpa/inet.h> /* for inet_ntoa() */
47
48+#include "prototypes.h"
49+
50 #if !defined(MAXHOSTNAMELEN) || (MAXHOSTNAMELEN < 64)
51 #undef MAXHOSTNAMELEN
52 #define MAXHOSTNAMELEN 256