From 749314fcf99cef4a1a162d622e10b6eb8998938f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 14 Jun 2012 20:30:16 +0200 Subject: dbwrap: dbwrap_store_int32->dbwrap_store_int32_bystring Signed-off-by: Michael Adam --- source3/lib/sharesec.c | 12 ++++++------ source3/passdb/pdb_tdb.c | 8 ++++---- source3/torture/test_dbwrap_watch.c | 2 +- source3/utils/net_idmap.c | 6 ++++-- source3/winbindd/idmap_tdb.c | 7 ++++--- 5 files changed, 19 insertions(+), 16 deletions(-) (limited to 'source3') diff --git a/source3/lib/sharesec.c b/source3/lib/sharesec.c index b53190d488..978edf2ece 100644 --- a/source3/lib/sharesec.c +++ b/source3/lib/sharesec.c @@ -192,8 +192,8 @@ bool share_info_db_init(void) if ((vers_id == SHARE_DATABASE_VERSION_V1) || (IREV(vers_id) == SHARE_DATABASE_VERSION_V1)) { /* Written on a bigendian machine with old fetch_int code. Save as le. */ - status = dbwrap_store_int32(share_db, vstring, - SHARE_DATABASE_VERSION_V2); + status = dbwrap_store_int32_bystring( + share_db, vstring, SHARE_DATABASE_VERSION_V2); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("dbwrap_store_int32 failed: %s\n", nt_errstr(status))); @@ -208,8 +208,8 @@ bool share_info_db_init(void) DEBUG(0, ("traverse failed\n")); goto cancel; } - status = dbwrap_store_int32(share_db, vstring, - SHARE_DATABASE_VERSION_V2); + status = dbwrap_store_int32_bystring( + share_db, vstring, SHARE_DATABASE_VERSION_V2); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("dbwrap_store_int32 failed: %s\n", nt_errstr(status))); @@ -224,8 +224,8 @@ bool share_info_db_init(void) DEBUG(0, ("traverse failed\n")); goto cancel; } - status = dbwrap_store_int32(share_db, vstring, - SHARE_DATABASE_VERSION_V3); + status = dbwrap_store_int32_bystring( + share_db, vstring, SHARE_DATABASE_VERSION_V3); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("dbwrap_store_int32 failed: %s\n", nt_errstr(status))); diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 067c364370..3faa4cf75d 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -392,16 +392,16 @@ static bool tdbsam_convert(struct db_context **pp_db, const char *name, int32 fr goto cancel; } - status = dbwrap_store_int32(db, TDBSAM_VERSION_STRING, - TDBSAM_VERSION); + status = dbwrap_store_int32_bystring(db, TDBSAM_VERSION_STRING, + TDBSAM_VERSION); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("tdbsam_convert: Could not store tdbsam version: " "%s\n", nt_errstr(status))); goto cancel; } - status = dbwrap_store_int32(db, TDBSAM_MINOR_VERSION_STRING, - TDBSAM_MINOR_VERSION); + status = dbwrap_store_int32_bystring(db, TDBSAM_MINOR_VERSION_STRING, + TDBSAM_MINOR_VERSION); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("tdbsam_convert: Could not store tdbsam minor " "version: %s\n", nt_errstr(status))); diff --git a/source3/torture/test_dbwrap_watch.c b/source3/torture/test_dbwrap_watch.c index 8011c57951..2a21617fe3 100644 --- a/source3/torture/test_dbwrap_watch.c +++ b/source3/torture/test_dbwrap_watch.c @@ -66,7 +66,7 @@ bool run_dbwrap_watch1(int dummy) } TALLOC_FREE(rec); - status = dbwrap_store_int32(db, keystr, 1); + status = dbwrap_store_int32_bystring(db, keystr, 1); if (!NT_STATUS_IS_OK(status)) { fprintf(stderr, "dbwrap_store_int32 failed: %s\n", nt_errstr(status)); diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c index 22734eecd8..28f9ed938e 100644 --- a/source3/utils/net_idmap.c +++ b/source3/utils/net_idmap.c @@ -285,7 +285,8 @@ static int net_idmap_restore(struct net_context *c, int argc, const char **argv) break; } } else if (sscanf(line, "USER HWM %lu", &idval) == 1) { - status = dbwrap_store_int32(db, "USER HWM", idval); + status = dbwrap_store_int32_bystring( + db, "USER HWM", idval); if (!NT_STATUS_IS_OK(status)) { d_fprintf(stderr, _("Could not store USER HWM: %s\n"), @@ -293,7 +294,8 @@ static int net_idmap_restore(struct net_context *c, int argc, const char **argv) break; } } else if (sscanf(line, "GROUP HWM %lu", &idval) == 1) { - status = dbwrap_store_int32(db, "GROUP HWM", idval); + status = dbwrap_store_int32_bystring( + db, "GROUP HWM", idval); if (!NT_STATUS_IS_OK(status)) { d_fprintf(stderr, _("Could not store GROUP HWM: %s\n"), diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c index a9a7e9c71a..3e46cf76b7 100644 --- a/source3/winbindd/idmap_tdb.c +++ b/source3/winbindd/idmap_tdb.c @@ -193,7 +193,7 @@ static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db) wm = dom->low_id; } - status = dbwrap_store_int32(db, HWM_USER, wm); + status = dbwrap_store_int32_bystring(db, HWM_USER, wm); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("Unable to byteswap user hwm in idmap " "database: %s\n", nt_errstr(status))); @@ -211,7 +211,7 @@ static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db) wm = dom->low_id; } - status = dbwrap_store_int32(db, HWM_GROUP, wm); + status = dbwrap_store_int32_bystring(db, HWM_GROUP, wm); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("Unable to byteswap group hwm in idmap " "database: %s\n", nt_errstr(status))); @@ -235,7 +235,8 @@ static bool idmap_tdb_upgrade(struct idmap_domain *dom, struct db_context *db) return False; } - status = dbwrap_store_int32(db, "IDMAP_VERSION", IDMAP_VERSION); + status = dbwrap_store_int32_bystring(db, "IDMAP_VERSION", + IDMAP_VERSION); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("Unable to store idmap version in database: %s\n", nt_errstr(status))); -- cgit