struct db_context *db = get_account_pol_db();
fstring tmp, keystr;
TDB_DATA data;
+ NTSTATUS status;
/* Fail if the admin has not enable privileges */
fstr_sprintf(keystr, "%s%s", PRIVPREFIX, sid_to_fstring(tmp, sid));
- data = dbwrap_fetch_bystring( db, talloc_tos(), keystr );
+ status = dbwrap_fetch_bystring(db, talloc_tos(), keystr, &data);
- if ( !data.dptr ) {
+ if (!NT_STATUS_IS_OK(status)) {
DEBUG(4, ("get_privileges: No privileges assigned to SID "
"[%s]\n", sid_string_dbg(sid)));
return False;