summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_tdb.c
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/winbindd/idmap_tdb.c
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/winbindd/idmap_tdb.c')
-rw-r--r--source3/winbindd/idmap_tdb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c
index 5e3e9c08b6..c1fa42d27d 100644
--- a/source3/winbindd/idmap_tdb.c
+++ b/source3/winbindd/idmap_tdb.c
@@ -723,9 +723,9 @@ static NTSTATUS idmap_tdb_id_to_sid(struct idmap_domain *dom, struct id_map *map
DEBUG(10,("Fetching record %s\n", keystr));
/* Check if the mapping exists */
- data = dbwrap_fetch_bystring(ctx->db, NULL, keystr);
+ ret = dbwrap_fetch_bystring(ctx->db, NULL, keystr, &data);
- if (!data.dptr) {
+ if (!NT_STATUS_IS_OK(ret)) {
DEBUG(10,("Record %s not found\n", keystr));
ret = NT_STATUS_NONE_MAPPED;
goto done;
@@ -772,8 +772,8 @@ static NTSTATUS idmap_tdb_sid_to_id(struct idmap_domain *dom, struct id_map *map
DEBUG(10,("Fetching record %s\n", keystr));
/* Check if sid is present in database */
- data = dbwrap_fetch_bystring(ctx->db, tmp_ctx, keystr);
- if (!data.dptr) {
+ ret = dbwrap_fetch_bystring(ctx->db, tmp_ctx, keystr, &data);
+ if (!NT_STATUS_IS_OK(ret)) {
DEBUG(10,("Record %s not found\n", keystr));
ret = NT_STATUS_NONE_MAPPED;
goto done;