svn commit: samba r13209 - branches/SAMBA_3_0/source/passdb
trunk/source/passdb
vlendec at samba.org
vlendec at samba.org
Sat Jan 28 17:08:25 GMT 2006
Author: vlendec
Date: 2006-01-28 17:08:24 +0000 (Sat, 28 Jan 2006)
New Revision: 13209
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13209
Log:
Make smbpasswd -a work again if passdb did not exist.
Volker
Modified:
branches/SAMBA_3_0/source/passdb/pdb_tdb.c
trunk/source/passdb/pdb_tdb.c
Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_tdb.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/pdb_tdb.c 2006-01-28 12:58:38 UTC (rev 13208)
+++ branches/SAMBA_3_0/source/passdb/pdb_tdb.c 2006-01-28 17:08:24 UTC (rev 13209)
@@ -423,6 +423,7 @@
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)));
Modified: trunk/source/passdb/pdb_tdb.c
===================================================================
--- trunk/source/passdb/pdb_tdb.c 2006-01-28 12:58:38 UTC (rev 13208)
+++ trunk/source/passdb/pdb_tdb.c 2006-01-28 17:08:24 UTC (rev 13209)
@@ -423,6 +423,7 @@
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)));
More information about the samba-cvs
mailing list