diff options
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2024-01-18 18:08:05 +0100 |
---|---|---|
committer | Tobias Stoeckmann <tobias@stoeckmann.org> | 2024-01-18 18:22:51 +0100 |
commit | 0703453bec6ac54ad31d7245be4529796a3ef764 (patch) | |
tree | 0058379a6d18519f1fa1c6a83a5e7c3a17d10248 /modules/pam_env/pam_env.c | |
parent | 560a1c4dd86d63640da78ab17d72b6ce24fbebfc (diff) | |
download | pam-0703453bec6ac54ad31d7245be4529796a3ef764.tar.gz pam-0703453bec6ac54ad31d7245be4529796a3ef764.tar.bz2 pam-0703453bec6ac54ad31d7245be4529796a3ef764.zip |
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>
Diffstat (limited to 'modules/pam_env/pam_env.c')
-rw-r--r-- | modules/pam_env/pam_env.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/pam_env/pam_env.c b/modules/pam_env/pam_env.c index 59adc942..a0b812ff 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") |