Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 1 | From 8b845fff891798a03bdf21354b52e4487c2c0200 Mon Sep 17 00:00:00 2001 |
| 2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 3 | Date: Thu, 14 Apr 2022 23:11:53 +0000 |
| 4 | Subject: [PATCH] Disable use of syslog for shadow-native tools |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 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 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 10 | Upstream-Status: Inappropriate [OE specific configuration] |
| 11 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 12 | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 13 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 14 | --- |
| 15 | configure.ac | 2 +- |
| 16 | src/login_nopam.c | 3 ++- |
| 17 | 2 files changed, 3 insertions(+), 2 deletions(-) |
| 18 | |
| 19 | diff --git a/configure.ac b/configure.ac |
| 20 | index 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", |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 24 | [Path to passwd program.]) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 25 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 26 | dnl XXX - quick hack, should disappear before anyone notices :). |
| 27 | -AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().]) |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 28 | +#AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().]) |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 29 | if test "$ac_cv_func_ruserok" = "yes"; then |
| 30 | AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.]) |
| 31 | AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).]) |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 32 | diff --git a/src/login_nopam.c b/src/login_nopam.c |
| 33 | index 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 |