Allow LOGIN_ENV_SAFELIST (from util-linux) in /etc/login.defs

Using patch from upstream.

Gbp-Dch: full
This commit is contained in:
Chris Hofstaedtler
2025-04-19 12:19:56 +02:00
parent 4e64c42f1e
commit 4660554e73
2 changed files with 25 additions and 0 deletions

View File

@@ -10,3 +10,4 @@ debian/Stop-building-programs-we-do-not-install.patch
debian/Warn-when-badname-and-variants-are-given.patch
debian/configure.ac-align-exec_prefix-with-prefix.patch
upstream/Accept-usr-sbin-nologin-as-an-alternate-to-sbin-nologin.patch
upstream/Add-LOGIN_ENV_SAFELIST-to-FOREIGNDEFS.patch

View File

@@ -0,0 +1,24 @@
From: Stanislav Brabec <sbrabec@suse.cz>
Date: Wed, 9 Apr 2025 02:03:10 +0200
Subject: Add LOGIN_ENV_SAFELIST to FOREIGNDEFS
util-linux-2.41 introduced new variable: LOGIN_ENV_SAFELIST.
Add it to known login.defs variables.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
---
lib/getdef.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/getdef.c b/lib/getdef.c
index e354d89..8883a29 100644
--- a/lib/getdef.c
+++ b/lib/getdef.c
@@ -76,6 +76,7 @@ struct itemdef {
#define FOREIGNDEFS \
{"ALWAYS_SET_PATH", NULL}, \
{"ENV_ROOTPATH", NULL}, \
+ {"LOGIN_ENV_SAFELIST", NULL}, \
{"LOGIN_KEEP_USERNAME", NULL}, \
{"LOGIN_PLAIN_PROMPT", NULL}, \
{"MOTD_FIRSTONLY", NULL}, \