diff options
author | Michael Adam <obnox@samba.org> | 2011-08-24 13:08:13 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-10-11 14:17:56 +0200 |
commit | 0e28448a780cf231ae38fe03a85cf6e1ea9dded0 (patch) | |
tree | 91878c39866520bc06d968cd44cd8a86995cc8ad /source3/winbindd/idmap_autorid.c | |
parent | 25a9978c2c4d00eb64b212170f64f5cc136e032a (diff) | |
download | samba-0e28448a780cf231ae38fe03a85cf6e1ea9dded0.tar.gz samba-0e28448a780cf231ae38fe03a85cf6e1ea9dded0.tar.xz samba-0e28448a780cf231ae38fe03a85cf6e1ea9dded0.zip |
s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS
Diffstat (limited to 'source3/winbindd/idmap_autorid.c')
-rw-r--r-- | source3/winbindd/idmap_autorid.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index 85ddca2242..780f533c56 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -136,6 +136,7 @@ static NTSTATUS idmap_autorid_id_to_sid(struct autorid_global_config *cfg, TDB_DATA data; char *keystr; struct dom_sid sid; + NTSTATUS status; /* can this be one of our ids? */ if (map->xid.id < cfg->minvalue) { @@ -160,10 +161,10 @@ static NTSTATUS idmap_autorid_id_to_sid(struct autorid_global_config *cfg, return NT_STATUS_NO_MEMORY; } - data = dbwrap_fetch_bystring(autorid_db, talloc_tos(), keystr); + status = dbwrap_fetch_bystring(autorid_db, talloc_tos(), keystr, &data); TALLOC_FREE(keystr); - if (!data.dptr) { + if (!NT_STATUS_IS_OK(status)) { DEBUG(4, ("id %d belongs to range %d which does not have " "domain mapping, ignoring mapping request\n", map->xid.id, range)); @@ -383,10 +384,11 @@ static struct autorid_global_config *idmap_autorid_loadconfig(TALLOC_CTX * ctx) TDB_DATA data; struct autorid_global_config *cfg; unsigned long minvalue, rangesize, maxranges; + NTSTATUS status; - data = dbwrap_fetch_bystring(autorid_db, ctx, CONFIGKEY); + status = dbwrap_fetch_bystring(autorid_db, ctx, CONFIGKEY, &data); - if (!data.dptr) { + if (!NT_STATUS_IS_OK(status)) { DEBUG(10, ("No saved config found\n")); return NULL; } |