summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-06-14 20:26:28 +0200
committerMichael Adam <obnox@samba.org>2012-06-15 12:14:27 +0200
commit737c0a54731803c84f0f29d96dd40ac819aec3e8 (patch)
treede2309feed737fe96ee85cb1f67a946ef792d35d /source3
parent9afd4be688429d7bb344087cb3eda876f18e19f9 (diff)
downloadsamba-737c0a54731803c84f0f29d96dd40ac819aec3e8.tar.gz
samba-737c0a54731803c84f0f29d96dd40ac819aec3e8.tar.bz2
samba-737c0a54731803c84f0f29d96dd40ac819aec3e8.zip
dbwrap: dbwrap_fetch_int32->dbwrap_fetch_int32_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/sharesec.c4
-rw-r--r--source3/passdb/pdb_tdb.c15
-rw-r--r--source3/registry/reg_backend_db.c6
-rw-r--r--source3/utils/dbwrap_tool.c2
-rw-r--r--source3/winbindd/idmap_tdb.c8
5 files changed, 19 insertions, 16 deletions
diff --git a/source3/lib/sharesec.c b/source3/lib/sharesec.c
index cb8993cc8e..b53190d488 100644
--- a/source3/lib/sharesec.c
+++ b/source3/lib/sharesec.c
@@ -156,7 +156,7 @@ bool share_info_db_init(void)
return False;
}
- status = dbwrap_fetch_int32(share_db, vstring, &vers_id);
+ status = dbwrap_fetch_int32_bystring(share_db, vstring, &vers_id);
if (!NT_STATUS_IS_OK(status)) {
vers_id = 0;
}
@@ -171,7 +171,7 @@ bool share_info_db_init(void)
return false;
}
- status = dbwrap_fetch_int32(share_db, vstring, &vers_id);
+ status = dbwrap_fetch_int32_bystring(share_db, vstring, &vers_id);
if (!NT_STATUS_IS_OK(status)) {
vers_id = 0;
}
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index a090fcd5bb..067c364370 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -451,14 +451,15 @@ static bool tdbsam_open( const char *name )
}
/* Check the version */
- status = dbwrap_fetch_int32(db_sam, TDBSAM_VERSION_STRING, &version);
+ status = dbwrap_fetch_int32_bystring(db_sam, TDBSAM_VERSION_STRING,
+ &version);
if (!NT_STATUS_IS_OK(status)) {
version = 0; /* Version not found, assume version 0 */
}
/* Get the minor version */
- status = dbwrap_fetch_int32(db_sam, TDBSAM_MINOR_VERSION_STRING,
- &minor_version);
+ status = dbwrap_fetch_int32_bystring(
+ db_sam, TDBSAM_MINOR_VERSION_STRING, &minor_version);
if (!NT_STATUS_IS_OK(status)) {
minor_version = 0; /* Minor version not found, assume 0 */
}
@@ -493,15 +494,15 @@ static bool tdbsam_open( const char *name )
}
/* Re-check the version */
- status = dbwrap_fetch_int32(db_sam, TDBSAM_VERSION_STRING,
- &version);
+ status = dbwrap_fetch_int32_bystring(
+ db_sam, TDBSAM_VERSION_STRING, &version);
if (!NT_STATUS_IS_OK(status)) {
version = 0; /* Version not found, assume version 0 */
}
/* Re-check the minor version */
- status = dbwrap_fetch_int32(db_sam, TDBSAM_MINOR_VERSION_STRING,
- &minor_version);
+ status = dbwrap_fetch_int32_bystring(
+ db_sam, TDBSAM_MINOR_VERSION_STRING, &minor_version);
if (!NT_STATUS_IS_OK(status)) {
minor_version = 0; /* Minor version not found, assume 0 */
}
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index a5bb5d7943..2e8cef75fa 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -72,7 +72,8 @@ static NTSTATUS regdb_trans_do_action(struct db_context *db, void *private_data)
int32_t version_id;
struct regdb_trans_ctx *ctx = (struct regdb_trans_ctx *)private_data;
- status = dbwrap_fetch_int32(db, REGDB_VERSION_KEYNAME, &version_id);
+ status = dbwrap_fetch_int32_bystring(db, REGDB_VERSION_KEYNAME,
+ &version_id);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("ERROR: could not fetch registry db version: %s. "
@@ -754,7 +755,8 @@ WERROR regdb_init(void)
DEBUG(10, ("regdb_init: registry db openend. refcount reset (%d)\n",
regdb_refcount));
- status = dbwrap_fetch_int32(regdb, REGDB_VERSION_KEYNAME, &vers_id);
+ status = dbwrap_fetch_int32_bystring(regdb, REGDB_VERSION_KEYNAME,
+ &vers_id);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10, ("regdb_init: registry version uninitialized "
"(got %d), initializing to version %d\n",
diff --git a/source3/utils/dbwrap_tool.c b/source3/utils/dbwrap_tool.c
index c9d88a30e5..677a9adeb4 100644
--- a/source3/utils/dbwrap_tool.c
+++ b/source3/utils/dbwrap_tool.c
@@ -41,7 +41,7 @@ static int dbwrap_tool_fetch_int32(struct db_context *db,
int32_t value;
NTSTATUS status;
- status = dbwrap_fetch_int32(db, keyname, &value);
+ status = dbwrap_fetch_int32_bystring(db, keyname, &value);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Error fetching int32 from key '%s': %s\n",
keyname, nt_errstr(status));
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c
index f4ea07e613..a9a7e9c71a 100644
--- a/source3/winbindd/idmap_tdb.c
+++ b/source3/winbindd/idmap_tdb.c
@@ -168,7 +168,7 @@ static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db)
#endif
DEBUG(0, ("Upgrading winbindd_idmap.tdb from an old version\n"));
- status = dbwrap_fetch_int32(db, "IDMAP_VERSION", &vers);
+ status = dbwrap_fetch_int32_bystring(db, "IDMAP_VERSION", &vers);
if (!NT_STATUS_IS_OK(status)) {
vers = -1;
}
@@ -182,7 +182,7 @@ static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db)
int32 wm;
- status = dbwrap_fetch_int32(db, HWM_USER, &wm);
+ status = dbwrap_fetch_int32_bystring(db, HWM_USER, &wm);
if (!NT_STATUS_IS_OK(status)) {
wm = -1;
}
@@ -200,7 +200,7 @@ static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db)
return False;
}
- status = dbwrap_fetch_int32(db, HWM_GROUP, &wm);
+ status = dbwrap_fetch_int32_bystring(db, HWM_GROUP, &wm);
if (!NT_STATUS_IS_OK(status)) {
wm = -1;
}
@@ -345,7 +345,7 @@ static NTSTATUS idmap_tdb_open_db(struct idmap_domain *dom)
}
/* check against earlier versions */
- ret = dbwrap_fetch_int32(db, "IDMAP_VERSION", &version);
+ ret = dbwrap_fetch_int32_bystring(db, "IDMAP_VERSION", &version);
if (!NT_STATUS_IS_OK(ret)) {
version = -1;
}