- Add post 1.6.0 release fixes for pam_env:
- pam_env-fix-enable-vendordir-fallback.patch - pam_env-fix_vendordir.patch - pam_env-remove-escaped-newlines.patch OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/pam?expand=0&rev=285
This commit is contained in:
51
pam_env-fix_vendordir.patch
Normal file
51
pam_env-fix_vendordir.patch
Normal file
@@ -0,0 +1,51 @@
|
||||
From 0703453bec6ac54ad31d7245be4529796a3ef764 Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Stoeckmann <tobias@stoeckmann.org>
|
||||
Date: Thu, 18 Jan 2024 18:08:05 +0100
|
||||
Subject: [PATCH] pam_env: check VENDORDIR after config.h inclusion
|
||||
|
||||
The VENDORDIR define has to be checked after config.h
|
||||
inclusion, otherwise the ifdef test always yields false.
|
||||
|
||||
Fixes: 6135c45347b6 ("pam_env: Use vendor specific pam_env.conf and environment as fallback")
|
||||
|
||||
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
|
||||
---
|
||||
modules/pam_env/pam_env.c | 18 +++++++++---------
|
||||
1 file changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/modules/pam_env/pam_env.c b/modules/pam_env/pam_env.c
|
||||
index 59adc942c..a0b812fff 100644
|
||||
--- a/modules/pam_env/pam_env.c
|
||||
+++ b/modules/pam_env/pam_env.c
|
||||
@@ -6,15 +6,6 @@
|
||||
* template for this file (via pam_mail)
|
||||
*/
|
||||
|
||||
-#define DEFAULT_ETC_ENVFILE "/etc/environment"
|
||||
-#ifdef VENDORDIR
|
||||
-#define VENDOR_DEFAULT_ETC_ENVFILE (VENDORDIR "/environment")
|
||||
-#endif
|
||||
-#define DEFAULT_READ_ENVFILE 1
|
||||
-
|
||||
-#define DEFAULT_USER_ENVFILE ".pam_environment"
|
||||
-#define DEFAULT_USER_READ_ENVFILE 0
|
||||
-
|
||||
#include "config.h"
|
||||
|
||||
#include <ctype.h>
|
||||
@@ -52,6 +43,15 @@ typedef struct var {
|
||||
char *override;
|
||||
} VAR;
|
||||
|
||||
+#define DEFAULT_ETC_ENVFILE "/etc/environment"
|
||||
+#ifdef VENDORDIR
|
||||
+#define VENDOR_DEFAULT_ETC_ENVFILE (VENDORDIR "/environment")
|
||||
+#endif
|
||||
+#define DEFAULT_READ_ENVFILE 1
|
||||
+
|
||||
+#define DEFAULT_USER_ENVFILE ".pam_environment"
|
||||
+#define DEFAULT_USER_READ_ENVFILE 0
|
||||
+
|
||||
#define DEFAULT_CONF_FILE (SCONFIGDIR "/pam_env.conf")
|
||||
#ifdef VENDOR_SCONFIGDIR
|
||||
#define VENDOR_DEFAULT_CONF_FILE (VENDOR_SCONFIGDIR "/pam_env.conf")
|
Reference in New Issue
Block a user