summaryrefslogtreecommitdiff
path: root/source3/groupdb
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-08-24 13:08:13 +0200
committerMichael Adam <obnox@samba.org>2011-10-11 14:17:56 +0200
commit0e28448a780cf231ae38fe03a85cf6e1ea9dded0 (patch)
tree91878c39866520bc06d968cd44cd8a86995cc8ad /source3/groupdb
parent25a9978c2c4d00eb64b212170f64f5cc136e032a (diff)
downloadsamba-0e28448a780cf231ae38fe03a85cf6e1ea9dded0.tar.gz
samba-0e28448a780cf231ae38fe03a85cf6e1ea9dded0.tar.bz2
samba-0e28448a780cf231ae38fe03a85cf6e1ea9dded0.zip
s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS
Diffstat (limited to 'source3/groupdb')
-rw-r--r--source3/groupdb/mapping_tdb.c9
1 files changed, 5 insertions, 4 deletions
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;
}