summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-11 23:44:33 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-11 23:44:33 +0000
commit65cfe6a492b236f49edd591a7e728cbeeed3c344 (patch)
tree260b1b6eccf012db5c3946feee3a6469db62dc55 /source3
parent6526a42558e1fb9ff0b9cea1de70d492e1bc4ce6 (diff)
downloadsamba-65cfe6a492b236f49edd591a7e728cbeeed3c344.tar.gz
samba-65cfe6a492b236f49edd591a7e728cbeeed3c344.tar.bz2
samba-65cfe6a492b236f49edd591a7e728cbeeed3c344.zip
pam_smbpass updates from a.bokovoy@sam-solutions.net
(This used to be commit 016e203a2c5286d8b48ab3eff0226affc203deaf)
Diffstat (limited to 'source3')
-rw-r--r--source3/pam_smbpass/pam_smb_acct.c2
-rw-r--r--source3/pam_smbpass/pam_smb_auth.c2
-rw-r--r--source3/pam_smbpass/pam_smb_passwd.c2
-rw-r--r--source3/pam_smbpass/support.c29
4 files changed, 4 insertions, 31 deletions
diff --git a/source3/pam_smbpass/pam_smb_acct.c b/source3/pam_smbpass/pam_smb_acct.c
index 94a4f22613..8ed3ad7eda 100644
--- a/source3/pam_smbpass/pam_smb_acct.c
+++ b/source3/pam_smbpass/pam_smb_acct.c
@@ -69,7 +69,7 @@ int pam_sm_acct_mgmt( pam_handle_t *pamh, int flags,
_log_err( LOG_DEBUG, "acct: username [%s] obtained", name );
}
- if (!initialize_password_db()) {
+ if (!initialize_password_db(True)) {
_log_err( LOG_ALERT, "Cannot access samba password database" );
return PAM_AUTHINFO_UNAVAIL;
}
diff --git a/source3/pam_smbpass/pam_smb_auth.c b/source3/pam_smbpass/pam_smb_auth.c
index 8279915077..4b56b2b301 100644
--- a/source3/pam_smbpass/pam_smb_auth.c
+++ b/source3/pam_smbpass/pam_smb_auth.c
@@ -93,7 +93,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
_log_err( LOG_DEBUG, "username [%s] obtained", name );
}
- if (!initialize_password_db()) {
+ if (!initialize_password_db(True)) {
_log_err( LOG_ALERT, "Cannot access samba password database" );
retval = PAM_AUTHINFO_UNAVAIL;
AUTH_RETURN;
diff --git a/source3/pam_smbpass/pam_smb_passwd.c b/source3/pam_smbpass/pam_smb_passwd.c
index 9d0b13d6ce..8c207cee0d 100644
--- a/source3/pam_smbpass/pam_smb_passwd.c
+++ b/source3/pam_smbpass/pam_smb_passwd.c
@@ -119,7 +119,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
_log_err( LOG_DEBUG, "username [%s] obtained", user );
}
- if (!initialize_password_db()) {
+ if (!initialize_password_db(True)) {
_log_err( LOG_ALERT, "Cannot access samba password database" );
return PAM_AUTHINFO_UNAVAIL;
}
diff --git a/source3/pam_smbpass/support.c b/source3/pam_smbpass/support.c
index 007fb922eb..f35a354b7c 100644
--- a/source3/pam_smbpass/support.c
+++ b/source3/pam_smbpass/support.c
@@ -125,8 +125,7 @@ int make_remark( pam_handle_t * pamh, unsigned int ctrl
int set_ctrl( int flags, int argc, const char **argv )
{
int i = 0;
- static pstring servicesf = dyn_CONFIGFILE;
- const char *service_file = servicesf;
+ const char *service_file = dyn_CONFIGFILE;
unsigned int ctrl;
ctrl = SMB_DEFAULTS; /* the default selection of options */
@@ -216,32 +215,6 @@ void _cleanup( pam_handle_t * pamh, void *x, int error_status )
x = _pam_delete( (char *) x );
}
-/*
- * Safe duplication of character strings. "Paranoid"; don't leave
- * evidence of old token around for later stack analysis.
- */
-
-char * smb_xstrdup( const char *x )
-{
- register char *new = NULL;
-
- if (x != NULL) {
- register int i;
-
- for (i = 0; x[i]; ++i); /* length of string */
- if ((new = malloc(++i)) == NULL) {
- i = 0;
- _log_err( LOG_CRIT, "out of memory in smb_xstrdup" );
- } else {
- while (i-- > 0) {
- new[i] = x[i];
- }
- }
- x = NULL;
- }
- return new; /* return the duplicate or NULL on error */
-}
-
/* ************************************************************** *
* Useful non-trivial functions *
* ************************************************************** */