diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-01-28 17:08:24 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2006-01-28 17:08:24 +0000 |
commit | 78f251ea3b7476d59329380e70f54410009462c0 (patch) | |
tree | c22cfb14c913b0c3c9b8a7125d7d87751fb7389d /source | |
parent | b7877966d9d2fd140397264f49163120fbd41dfa (diff) | |
download | samba-78f251ea3b7476d59329380e70f54410009462c0.tar.gz samba-78f251ea3b7476d59329380e70f54410009462c0.tar.xz samba-78f251ea3b7476d59329380e70f54410009462c0.zip |
r13209: Make smbpasswd -a work again if passdb did not exist.
Volker
Diffstat (limited to 'source')
-rw-r--r-- | source/passdb/pdb_tdb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c index 164ec722998..370c8adc7dc 100644 --- a/source/passdb/pdb_tdb.c +++ b/source/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))); |