summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-04-15 00:18:34 +0200
committerStefan Metzmacher <metze@samba.org>2008-04-15 00:25:27 +0200
commit5a2e212c0f3674a55b28cbdbed9f7b1d20fdfcd8 (patch)
tree361b60cd4d36d0b520449121adc26071c2d958e2
parent625f2d6c2324ec78edc58d1d5ff697582b52b824 (diff)
downloadsamba-5a2e212c0f3674a55b28cbdbed9f7b1d20fdfcd8.tar.gz
samba-5a2e212c0f3674a55b28cbdbed9f7b1d20fdfcd8.tar.bz2
samba-5a2e212c0f3674a55b28cbdbed9f7b1d20fdfcd8.zip
lib/sharesec.c: fix the upgrade code, db_traverse returns the number of records!
metze (This used to be commit ccdebe97f85b76378e42d8cf08324228bd19cf32)
-rw-r--r--source3/lib/sharesec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/lib/sharesec.c b/source3/lib/sharesec.c
index 471363b4be..d89434782d 100644
--- a/source3/lib/sharesec.c
+++ b/source3/lib/sharesec.c
@@ -94,8 +94,10 @@ static bool share_info_db_init(void)
}
if (vers_id != SHARE_DATABASE_VERSION_V2) {
- if (share_db->traverse(share_db, delete_fn, NULL) != 0) {
- DEBUG(0, ("wipe_all failed\n"));
+ int ret;
+ ret = share_db->traverse(share_db, delete_fn, NULL);
+ if (ret < 0) {
+ DEBUG(0, ("traverse failed\n"));
goto cancel;
}
if (dbwrap_store_int32(share_db, vstring,