From 99ae1159fe885cf57ec5cd964febca2eca5def61 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Tue, 12 May 2009 01:16:52 +0200 Subject: [PATCH] s3-samr: Fix rid2sid call, 3-4-test does not have policy_handle_find() yet. Guenther --- source3/rpc_server/srv_samr_nt.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 0c8607387aa..4fb315d296d 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -6572,18 +6572,14 @@ NTSTATUS _samr_GetDisplayEnumerationIndex2(pipes_struct *p, NTSTATUS _samr_RidToSid(pipes_struct *p, struct samr_RidToSid *r) { - struct samr_domain_info *dinfo; - NTSTATUS status; + struct samr_info *info = NULL; struct dom_sid sid; - dinfo = policy_handle_find(p, r->in.domain_handle, - 0, NULL, - struct samr_domain_info, &status); - if (!NT_STATUS_IS_OK(status)) { - return status; + if (!find_policy_by_hnd(p, r->in.domain_handle, (void **)(void *)&info)) { + return NT_STATUS_INVALID_HANDLE; } - if (!sid_compose(&sid, &dinfo->sid, r->in.rid)) { + if (!sid_compose(&sid, &info->sid, r->in.rid)) { return NT_STATUS_NO_MEMORY; } -- 2.11.4.GIT