summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-04-11 15:18:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:59 -0500
commitadc0a34cebfcd84b1886a8b1ddb8eecfd6fb1e1a (patch)
tree4ceedef0288b88c76a8824fb2e9e9a4a428885c8 /source3
parent33788e5883b2d4e08a0d613044159df663162200 (diff)
downloadsamba-adc0a34cebfcd84b1886a8b1ddb8eecfd6fb1e1a.tar.gz
samba-adc0a34cebfcd84b1886a8b1ddb8eecfd6fb1e1a.tar.bz2
samba-adc0a34cebfcd84b1886a8b1ddb8eecfd6fb1e1a.zip
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)
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in3
-rw-r--r--source3/nsswitch/pam_winbind.c16
-rw-r--r--source3/nsswitch/pam_winbind.h6
3 files changed, 13 insertions, 12 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index a66f103bba..3b3bd75de9 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -512,8 +512,7 @@ RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
$(SMBLDAP_OBJ) $(DCUTIL_OBJ)
PAM_WINBIND_OBJ = nsswitch/pam_winbind.o $(WBCOMMON_OBJ) \
- lib/replace1.o $(SNPRINTF_OBJ) $(INIPARSER_OBJ) \
- dynconfig.o
+ lib/replace1.o $(SNPRINTF_OBJ) $(INIPARSER_OBJ)
PAM_WINBIND_PICOBJ = $(PAM_WINBIND_OBJ:.o=.@PICSUFFIX@)
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 <iniparser.h>
#if defined(SUNOS5) || defined(SUNOS4) || defined(HPUX) || defined(FREEBSD) || defined(AIX)
@@ -110,8 +114,6 @@ do { \
#include "winbind_client.h"
-#include <dynconfig.h>
-
#define PAM_WB_REMARK_DIRECT(h,x)\
{\
const char *error_string = NULL; \