summaryrefslogtreecommitdiff
path: root/source4/winbind/wb_cmd_lookupsid.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-10-31 20:28:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:36 -0500
commit4bb85c2939c879db566e117f6c1daa22377c0e4e (patch)
treed4c6934a83b637d568120066248183f697b676dc /source4/winbind/wb_cmd_lookupsid.c
parent5ca7979b2ca0cb9de1787023b2bf07e1048ba7cf (diff)
downloadsamba-4bb85c2939c879db566e117f6c1daa22377c0e4e.tar.gz
samba-4bb85c2939c879db566e117f6c1daa22377c0e4e.tar.bz2
samba-4bb85c2939c879db566e117f6c1daa22377c0e4e.zip
r11423: Add some TALLOC_CTX
(This used to be commit a043ef33dca19d5ac1cdead60a4faa8b3a950bf4)
Diffstat (limited to 'source4/winbind/wb_cmd_lookupsid.c')
-rw-r--r--source4/winbind/wb_cmd_lookupsid.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/winbind/wb_cmd_lookupsid.c b/source4/winbind/wb_cmd_lookupsid.c
index 1279cfe877..a92b2ea183 100644
--- a/source4/winbind/wb_cmd_lookupsid.c
+++ b/source4/winbind/wb_cmd_lookupsid.c
@@ -35,12 +35,13 @@ struct cmd_lookupsid_state {
static struct composite_context *lookupsid_send_req(struct wbsrv_domain *domain, void *p);
static NTSTATUS lookupsid_recv_req(struct composite_context *ctx, void *p);
-struct composite_context *wb_cmd_lookupsid_send(struct wbsrv_service *service,
+struct composite_context *wb_cmd_lookupsid_send(TALLOC_CTX *mem_ctx,
+ struct wbsrv_service *service,
const struct dom_sid *sid)
{
struct cmd_lookupsid_state *state;
- state = talloc(NULL, struct cmd_lookupsid_state);
+ state = talloc(mem_ctx, struct cmd_lookupsid_state);
state->sid = dom_sid_dup(state, sid);
if (state->sid == NULL) goto failed;
state->ctx = wb_domain_request_send(state, service,
@@ -95,11 +96,11 @@ NTSTATUS wb_cmd_lookupsid_recv(struct composite_context *c,
return status;
}
-NTSTATUS wb_cmd_lookupsid(struct wbsrv_service *service,
+NTSTATUS wb_cmd_lookupsid(TALLOC_CTX *mem_ctx, struct wbsrv_service *service,
const struct dom_sid *sid,
- TALLOC_CTX *mem_ctx, struct wb_sid_object **name)
+ struct wb_sid_object **name)
{
struct composite_context *c =
- wb_cmd_lookupsid_send(service, sid);
+ wb_cmd_lookupsid_send(mem_ctx, service, sid);
return wb_cmd_lookupsid_recv(c, mem_ctx, name);
}