From b2e8358b3d76d88d5dc090095a4e62647c823aa5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 28 Jan 2006 17:08:24 +0000 Subject: r13209: Make smbpasswd -a work again if passdb did not exist. Volker (This used to be commit e747ea7250b3ff19aee49072a2cf95840ff50b85) --- source3/passdb/pdb_tdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 164ec722998..370c8adc7dc 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))); -- cgit