From: Günther Deschner Date: Thu, 24 May 2007 20:26:07 +0000 (+0000) Subject: r23121: Fix Bug #2727 and let pam_smbpass at least link and dlopen correctly again. X-Git-Tag: build_3.2.7_ctdb.53~4690 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=ba956ab8e4097d46bbad12caf2fad6857f463618;p=obnox%2Fsamba%2Fsamba-obnox.git r23121: Fix Bug #2727 and let pam_smbpass at least link and dlopen correctly again. Thanks to Bartlomiej Solarz-Niesluchowski . Guenther --- diff --git a/source/Makefile.in b/source/Makefile.in index 4a01c7d454c..eb68052b5b0 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -806,10 +806,10 @@ WINBIND_WINS_NSS_OBJ = nsswitch/wins.o $(PARAM_OBJ) \ $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(NSSWINS_OBJ) $(KRBCLIENT_OBJ) $(SECRETS_OBJ) PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \ - pam_smbpass/pam_smb_acct.o pam_smbpass/support.o \ - $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ + pam_smbpass/pam_smb_acct.o pam_smbpass/support.o +PAM_SMBPASS_OBJ= $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ $(SECRETS_OBJ) $(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) \ - $(RPC_PARSE_OBJ1) $(DOSERR_OBJ) $(LDB_OBJ) + $(RPC_PARSE_OBJ1) $(DOSERR_OBJ) $(LDB_OBJ) $(ERRORMAP_OBJ) IDMAP_OBJ = nsswitch/idmap.o nsswitch/idmap_cache.o nsswitch/idmap_util.o @IDMAP_STATIC@ diff --git a/source/pam_smbpass/general.h b/source/pam_smbpass/general.h index d3afb4c1fc4..320bdd0cc87 100644 --- a/source/pam_smbpass/general.h +++ b/source/pam_smbpass/general.h @@ -121,7 +121,7 @@ static const SMB_Ctrls smb_args[SMB_CTRLS_] = { struct _pam_failed_auth { char *user; /* user that's failed to be authenticated */ - int id; /* uid of requested user */ + uid_t id; /* uid of requested user */ char *agent; /* attempt from user with name */ int count; /* number of failures so far */ }; diff --git a/source/pam_smbpass/pam_smb_acct.c b/source/pam_smbpass/pam_smb_acct.c index f3b20465ab5..66e7301dae0 100644 --- a/source/pam_smbpass/pam_smb_acct.c +++ b/source/pam_smbpass/pam_smb_acct.c @@ -81,7 +81,7 @@ int pam_sm_acct_mgmt( pam_handle_t *pamh, int flags, /* Getting into places that might use LDAP -- protect the app from a SIGPIPE it's not expecting */ oldsig_handler = CatchSignal(SIGPIPE, SIGNAL_CAST SIG_IGN); - if (!initialize_password_db(True)) { + if (!initialize_password_db(True, NULL)) { _log_err( LOG_ALERT, "Cannot access samba password database" ); CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler); return PAM_AUTHINFO_UNAVAIL; diff --git a/source/pam_smbpass/pam_smb_auth.c b/source/pam_smbpass/pam_smb_auth.c index ceb23c3633a..819918e1442 100644 --- a/source/pam_smbpass/pam_smb_auth.c +++ b/source/pam_smbpass/pam_smb_auth.c @@ -109,7 +109,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, _log_err( LOG_DEBUG, "username [%s] obtained", name ); } - if (!initialize_password_db(True)) { + if (!initialize_password_db(True, NULL)) { _log_err( LOG_ALERT, "Cannot access samba password database" ); retval = PAM_AUTHINFO_UNAVAIL; AUTH_RETURN; diff --git a/source/pam_smbpass/pam_smb_passwd.c b/source/pam_smbpass/pam_smb_passwd.c index cffee745620..9f36bc11e4b 100644 --- a/source/pam_smbpass/pam_smb_passwd.c +++ b/source/pam_smbpass/pam_smb_passwd.c @@ -137,7 +137,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags, from a SIGPIPE it's not expecting */ oldsig_handler = CatchSignal(SIGPIPE, SIGNAL_CAST SIG_IGN); - if (!initialize_password_db(False)) { + if (!initialize_password_db(False, NULL)) { _log_err( LOG_ALERT, "Cannot access samba password database" ); CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler); return PAM_AUTHINFO_UNAVAIL;