summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-04-30 01:39:22 +0000
committerJeremy Allison <jra@samba.org>1998-04-30 01:39:22 +0000
commit3eae1e3f8e53c51f638b1b381085f29feea1c517 (patch)
tree92950328598c40648d89557bf0b2048f0a8bd606 /source3/passdb
parent90177708aaf5bf17d689979701b5f0156b8a2fa4 (diff)
downloadsamba-3eae1e3f8e53c51f638b1b381085f29feea1c517.tar.gz
samba-3eae1e3f8e53c51f638b1b381085f29feea1c517.tar.bz2
samba-3eae1e3f8e53c51f638b1b381085f29feea1c517.zip
Added patch from Bruce Tenison <btenison@dibbs.net> to allow encrypted
passwords to be stored over time, allowing a smbpasswd file migration. Adds new parameter "update encrypted". Will also add to 1.9.18 branch. Docs update to follow. Jeremy. (This used to be commit 5d3e874d780d595415cc27a7f5945fc2e694c3ac)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/smbpass.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/passdb/smbpass.c b/source3/passdb/smbpass.c
index 2ab21f78ef..cd3cc76909 100644
--- a/source3/passdb/smbpass.c
+++ b/source3/passdb/smbpass.c
@@ -731,9 +731,11 @@ Error was %s. Password file may be corrupt ! Please examine by hand !\n",
and then modify its password entry. We can't use the startsmbpwent()/
getsmbpwent()/endsmbpwent() interfaces here as we depend on looking
in the actual file to decide how much room we have to write data.
+ override = False, normal
+ override = True, override XXXXXXXX'd out password or NO PASS
************************************************************************/
-BOOL mod_smbpwd_entry(struct smb_passwd* pwd)
+BOOL mod_smbpwd_entry(struct smb_passwd* pwd, BOOL override)
{
/* Static buffers we will return. */
static pstring user_name;
@@ -895,9 +897,9 @@ BOOL mod_smbpwd_entry(struct smb_passwd* pwd)
/* Record exact password position */
pwd_seekpos += PTR_DIFF(p, linebuf);
- if (*p == '*' || *p == 'X') {
+ if (!override && (*p == '*' || *p == 'X')) {
/* Password deliberately invalid - end here. */
- DEBUG(10, ("get_smbpwd_entry: entry invalidated for user %s\n", user_name));
+ DEBUG(10, ("mod_smbpwd_entry: entry invalidated for user %s\n", user_name));
pw_file_unlock(lockfd, &pw_file_lock_depth);
fclose(fp);
return False;
@@ -917,7 +919,7 @@ BOOL mod_smbpwd_entry(struct smb_passwd* pwd)
return False;
}
- if (*p == '*' || *p == 'X') {
+ if (!override && (*p == '*' || *p == 'X')) {
pw_file_unlock(lockfd,&pw_file_lock_depth);
fclose(fp);
return False;