From adc0a34cebfcd84b1886a8b1ddb8eecfd6fb1e1a Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 11 Apr 2006 15:18:46 +0000 Subject: r15040: Stripping the parametric options in pam_winbind and use /etc/security/pam_winbind.conf as config file for the PAM module by default. Guenther (This used to be commit 41b79ee80c7b0f4836ded51d42c7dc91cba75ccd) --- source3/nsswitch/pam_winbind.c | 16 ++++++++-------- source3/nsswitch/pam_winbind.h | 6 ++++-- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c index 420f52122a..b2c3a01164 100644 --- a/source3/nsswitch/pam_winbind.c +++ b/source3/nsswitch/pam_winbind.c @@ -61,7 +61,7 @@ static int _pam_parse(int argc, const char **argv, dictionary **d) } if (config_file == NULL) { - config_file = dyn_CONFIGFILE; + config_file = PAM_WINBIND_CONFIG_FILE; } *d = iniparser_load(CONST_DISCARD(char *, config_file)); @@ -69,24 +69,24 @@ static int _pam_parse(int argc, const char **argv, dictionary **d) return -1; } - if (iniparser_getboolean(*d, CONST_DISCARD(char *, "global:pam_winbind:debug"), False)) { + if (iniparser_getboolean(*d, CONST_DISCARD(char *, "global:debug"), False)) { ctrl |= WINBIND_DEBUG_ARG; } - if (iniparser_getboolean(*d, CONST_DISCARD(char *, "global:pam_winbind:cached_login"), False)) { + if (iniparser_getboolean(*d, CONST_DISCARD(char *, "global:cached_login"), False)) { ctrl |= WINBIND_CACHED_LOGIN; } - if (iniparser_getboolean(*d, CONST_DISCARD(char *, "global:pam_winbind:krb5_auth"), False) == True) { + if (iniparser_getboolean(*d, CONST_DISCARD(char *, "global:krb5_auth"), False)) { ctrl |= WINBIND_KRB5_AUTH; } - if (iniparser_getstr(*d, CONST_DISCARD(char *,"global:pam_winbind:krb5_ccache_type")) != NULL) { + if (iniparser_getstr(*d, CONST_DISCARD(char *,"global:krb5_ccache_type")) != NULL) { ctrl |= WINBIND_KRB5_CCACHE_TYPE; } - if ((iniparser_getstr(*d, CONST_DISCARD(char *, "global:pam_winbind:require-membership-of")) != NULL) || - (iniparser_getstr(*d, CONST_DISCARD(char *, "global:pam_winbind:require_membership_of")) != NULL)) { + if ((iniparser_getstr(*d, CONST_DISCARD(char *, "global:require-membership-of")) != NULL) || + (iniparser_getstr(*d, CONST_DISCARD(char *, "global:require_membership_of")) != NULL)) { ctrl |= WINBIND_REQUIRED_MEMBERSHIP; } @@ -794,7 +794,7 @@ const char *get_conf_item_string(int argc, if (d != NULL) { - if (!asprintf(&key, "global:pam_winbind:%s", item)) { + if (!asprintf(&key, "global:%s", item)) { goto out; } diff --git a/source3/nsswitch/pam_winbind.h b/source3/nsswitch/pam_winbind.h index 8d2239aa11..89553ebfc3 100644 --- a/source3/nsswitch/pam_winbind.h +++ b/source3/nsswitch/pam_winbind.h @@ -26,6 +26,10 @@ #define PAM_SM_ACCOUNT #define PAM_SM_PASSWORD +#ifndef PAM_WINBIND_CONFIG_FILE +#define PAM_WINBIND_CONFIG_FILE "/etc/security/pam_winbind.conf" +#endif + #include #if defined(SUNOS5) || defined(SUNOS4) || defined(HPUX) || defined(FREEBSD) || defined(AIX) @@ -110,8 +114,6 @@ do { \ #include "winbind_client.h" -#include - #define PAM_WB_REMARK_DIRECT(h,x)\ {\ const char *error_string = NULL; \ -- cgit