summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/account_pol.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/passdb/account_pol.c b/source3/passdb/account_pol.c
index 9b6e4f6c63..dd495082a2 100644
--- a/source3/passdb/account_pol.c
+++ b/source3/passdb/account_pol.c
@@ -211,8 +211,9 @@ bool init_account_policy(void)
{
const char *vstring = "INFO/version";
- uint32 version;
+ uint32_t version = 0;
int i;
+ bool ret;
if (db != NULL) {
return True;
@@ -231,7 +232,11 @@ bool init_account_policy(void)
}
}
- version = dbwrap_fetch_int32(db, vstring);
+ ret = dbwrap_fetch_uint32(db, vstring, &version);
+ if (!ret) {
+ version = 0;
+ }
+
if (version == DATABASE_VERSION) {
return true;
}
@@ -244,7 +249,11 @@ bool init_account_policy(void)
return false;
}
- version = dbwrap_fetch_int32(db, vstring);
+ ret = dbwrap_fetch_uint32(db, vstring, &version);
+ if (!ret) {
+ version = 0;
+ }
+
if (version == DATABASE_VERSION) {
/*
* Race condition