blob: 628db42136f8f8e832e6c3d88ce89f22cf41a9dc [file] [log] [blame]
From 8b845fff891798a03bdf21354b52e4487c2c0200 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Thu, 14 Apr 2022 23:11:53 +0000
Subject: [PATCH] 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 [OE specific configuration]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
configure.ac | 2 +-
src/login_nopam.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5dcae19..b2c58f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,7 +204,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd",
[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, 1, [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).])
diff --git a/src/login_nopam.c b/src/login_nopam.c
index df6ba88..fc24e13 100644
--- a/src/login_nopam.c
+++ b/src/login_nopam.c
@@ -29,7 +29,6 @@
#ifndef USE_PAM
#ident "$Id$"
-#include "prototypes.h"
/*
* This module implements a simple but effective form of login access
* control based on login names and on host (or domain) names, internet
@@ -57,6 +56,8 @@
#include <netinet/in.h>
#include <arpa/inet.h> /* for inet_ntoa() */
+#include "prototypes.h"
+
#if !defined(MAXHOSTNAMELEN) || (MAXHOSTNAMELEN < 64)
#undef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 256