summaryrefslogtreecommitdiff
path: root/source3/passdb/account_pol.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-10-06 20:00:17 +0200
committerMichael Adam <obnox@samba.org>2011-10-11 14:17:58 +0200
commitf03e4aea66aa59662a49b3dc60917d7b619d7af2 (patch)
tree859ab7d120a9d99b046e4498ba59ba7b07af0dff /source3/passdb/account_pol.c
parentf8cad3a7683c7d026a1a038688c3b7b649db48fc (diff)
downloadsamba-f03e4aea66aa59662a49b3dc60917d7b619d7af2.tar.gz
samba-f03e4aea66aa59662a49b3dc60917d7b619d7af2.tar.bz2
samba-f03e4aea66aa59662a49b3dc60917d7b619d7af2.zip
s3:passdb:account_pol: use dbwrap_fetch_uint32, not dbwrap_fetch_int32 for the DB version
This is also stored as uint32_t.
Diffstat (limited to 'source3/passdb/account_pol.c')
-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