From 0e28448a780cf231ae38fe03a85cf6e1ea9dded0 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 24 Aug 2011 13:08:13 +0200 Subject: s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS --- source3/groupdb/mapping_tdb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/groupdb') diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c index 47f743d146..8f417a524a 100644 --- a/source3/groupdb/mapping_tdb.c +++ b/source3/groupdb/mapping_tdb.c @@ -173,6 +173,7 @@ static bool get_group_map_from_sid(struct dom_sid sid, GROUP_MAP *map) TDB_DATA dbuf; char *key; int ret = 0; + NTSTATUS status; /* the key is the SID, retrieving is direct */ @@ -181,8 +182,8 @@ static bool get_group_map_from_sid(struct dom_sid sid, GROUP_MAP *map) return false; } - dbuf = dbwrap_fetch_bystring(db, key, key); - if (dbuf.dptr == NULL) { + status = dbwrap_fetch_bystring(db, key, key, &dbuf); + if (!NT_STATUS_IS_OK(status)) { TALLOC_FREE(key); return false; } @@ -404,8 +405,8 @@ static NTSTATUS one_alias_membership(const struct dom_sid *member, slprintf(key, sizeof(key), "%s%s", MEMBEROF_PREFIX, sid_to_fstring(tmp, member)); - dbuf = dbwrap_fetch_bystring(db, frame, key); - if (dbuf.dptr == NULL) { + status = dbwrap_fetch_bystring(db, frame, key, &dbuf); + if (!NT_STATUS_IS_OK(status)) { TALLOC_FREE(frame); return NT_STATUS_OK; } -- cgit