summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-04-15 00:12:45 +0200
committerStefan Metzmacher <metze@samba.org>2008-04-15 00:25:11 +0200
commit625f2d6c2324ec78edc58d1d5ff697582b52b824 (patch)
treeef1a61f86734422460e0f413b9c02ad94262ac5d /source3
parentae1e1085a1c6e2a3f1a2821cd22a6caed63d3b05 (diff)
downloadsamba-625f2d6c2324ec78edc58d1d5ff697582b52b824.tar.gz
samba-625f2d6c2324ec78edc58d1d5ff697582b52b824.tar.bz2
samba-625f2d6c2324ec78edc58d1d5ff697582b52b824.zip
pdb_tdb: fix the upgrade code, db_traverse returns the number of records!
metze (This used to be commit baaf571d540ace5119c528fd35bceab335bd6741)
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_tdb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 068ddb3692..9c8c7b8517 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/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;
}