diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-04-15 00:12:45 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-04-15 00:25:11 +0200 |
commit | baaf571d540ace5119c528fd35bceab335bd6741 (patch) | |
tree | 01247e0068d4b90b9f9dafa2f3430a42a0132655 /source/passdb | |
parent | 9003881773de787a51ceadcdc2cb1e95f6979763 (diff) | |
download | samba-baaf571d540ace5119c528fd35bceab335bd6741.tar.gz samba-baaf571d540ace5119c528fd35bceab335bd6741.tar.xz samba-baaf571d540ace5119c528fd35bceab335bd6741.zip |
pdb_tdb: fix the upgrade code, db_traverse returns the number of records!
metze
Diffstat (limited to 'source/passdb')
-rw-r--r-- | source/passdb/pdb_tdb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c index 068ddb3692c..9c8c7b85179 100644 --- a/source/passdb/pdb_tdb.c +++ b/source/passdb/pdb_tdb.c @@ -775,6 +775,7 @@ static int tdbsam_convert_one(struct db_record *rec, void *priv) static bool tdbsam_convert(struct db_context *db, int32 from) { struct tdbsam_convert_state state; + int ret; state.from = from; state.success = true; @@ -784,7 +785,8 @@ static bool tdbsam_convert(struct db_context *db, int32 from) return false; } - if (db->traverse(db, tdbsam_convert_one, &state) != 0) { + ret = db->traverse(db, tdbsam_convert_one, &state); + if (ret < 0) { DEBUG(0, ("traverse failed\n")); goto cancel; } |