summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-01-28 17:08:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:17 -0500
commitb2e8358b3d76d88d5dc090095a4e62647c823aa5 (patch)
treee7e44022fd5ad82c3e8bd328c09ec2d5d38c5a87 /source3
parent5fa89783ab44e52495036531c2ceb69f2f9aa59d (diff)
downloadsamba-b2e8358b3d76d88d5dc090095a4e62647c823aa5.tar.gz
samba-b2e8358b3d76d88d5dc090095a4e62647c823aa5.tar.bz2
samba-b2e8358b3d76d88d5dc090095a4e62647c823aa5.zip
r13209: Make smbpasswd -a work again if passdb did not exist.
Volker (This used to be commit e747ea7250b3ff19aee49072a2cf95840ff50b85)
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_tdb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 164ec72299..370c8adc7d 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -423,6 +423,7 @@ static NTSTATUS tdbsam_getsampwnam (struct pdb_methods *my_methods, SAM_ACCOUNT
if ((pwd_tdb = tdbsam_tdbopen(tdb_state->tdbsam_location, O_CREAT|O_RDWR )) != NULL) {
DEBUG(0, ("pdb_getsampwnam: TDB passwd (%s) did not exist. File successfully created.\n",
tdb_state->tdbsam_location));
+ tdb_close(pwd_tdb);
} else {
DEBUG(0, ("pdb_getsampwnam: TDB passwd (%s) does not exist. Couldn't create new one. Error was: %s\n",
tdb_state->tdbsam_location, strerror(errno)));