From: Volker Lendecke Date: Sun, 16 Aug 2009 10:46:55 +0000 (+0200) Subject: s3:winbind: The get[gr|pw]end functions need access to the client state X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=2c23e7dc5a5d305406a156402ec805ed05e5a11f s3:winbind: The get[gr|pw]end functions need access to the client state --- diff --git a/source3/winbindd/wb_ping.c b/source3/winbindd/wb_ping.c index 12013984376b..bfba3c168bbb 100644 --- a/source3/winbindd/wb_ping.c +++ b/source3/winbindd/wb_ping.c @@ -25,6 +25,7 @@ struct wb_ping_state { }; struct tevent_req *wb_ping_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req; diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 554cb0a30a61..1a76f87463e7 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -499,6 +499,7 @@ struct winbindd_async_dispatch_table { const char *cmd_name; struct tevent_req *(*send_req)(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS (*recv_req)(struct tevent_req *req, struct winbindd_response *presp); @@ -570,7 +571,7 @@ static void process_request(struct winbindd_cli_state *state) atable->cmd_name)); req = atable->send_req(state->mem_ctx, winbind_event_context(), - state->request); + state, state->request); if (req == NULL) { DEBUG(0, ("process_request: atable->send failed for " "%s\n", atable->cmd_name)); diff --git a/source3/winbindd/winbindd_getgrgid.c b/source3/winbindd/winbindd_getgrgid.c index 82204ad09558..4feebdb4f6ea 100644 --- a/source3/winbindd/winbindd_getgrgid.c +++ b/source3/winbindd/winbindd_getgrgid.c @@ -34,6 +34,7 @@ static void winbindd_getgrgid_done(struct tevent_req *subreq); struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_getgrnam.c b/source3/winbindd/winbindd_getgrnam.c index 85e60a27578f..d55796513fad 100644 --- a/source3/winbindd/winbindd_getgrnam.c +++ b/source3/winbindd/winbindd_getgrnam.c @@ -35,6 +35,7 @@ static void winbindd_getgrnam_done(struct tevent_req *subreq); struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_getgroups.c b/source3/winbindd/winbindd_getgroups.c index 9e6465696e83..3bdf762c458e 100644 --- a/source3/winbindd/winbindd_getgroups.c +++ b/source3/winbindd/winbindd_getgroups.c @@ -39,6 +39,7 @@ static void winbindd_getgroups_sid2gid_done(struct tevent_req *subreq); struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_getpwnam.c b/source3/winbindd/winbindd_getpwnam.c index 80b618c4aa81..77e827e24151 100644 --- a/source3/winbindd/winbindd_getpwnam.c +++ b/source3/winbindd/winbindd_getpwnam.c @@ -34,6 +34,7 @@ static void winbindd_getpwnam_done(struct tevent_req *subreq); struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_getpwsid.c b/source3/winbindd/winbindd_getpwsid.c index 135cbf6f61f8..055de17f91a7 100644 --- a/source3/winbindd/winbindd_getpwsid.c +++ b/source3/winbindd/winbindd_getpwsid.c @@ -29,6 +29,7 @@ static void winbindd_getpwsid_done(struct tevent_req *subreq); struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_getpwuid.c b/source3/winbindd/winbindd_getpwuid.c index 0c667cfcccee..d47c0852143f 100644 --- a/source3/winbindd/winbindd_getpwuid.c +++ b/source3/winbindd/winbindd_getpwuid.c @@ -31,6 +31,7 @@ static void winbindd_getpwuid_done(struct tevent_req *subreq); struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_getsidaliases.c b/source3/winbindd/winbindd_getsidaliases.c index 788c88f5506c..6755fa149f02 100644 --- a/source3/winbindd/winbindd_getsidaliases.c +++ b/source3/winbindd/winbindd_getsidaliases.c @@ -30,6 +30,7 @@ static void winbindd_getsidaliases_done(struct tevent_req *subreq); struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_getuserdomgroups.c b/source3/winbindd/winbindd_getuserdomgroups.c index e67768307ff1..0bba02486240 100644 --- a/source3/winbindd/winbindd_getuserdomgroups.c +++ b/source3/winbindd/winbindd_getuserdomgroups.c @@ -30,6 +30,7 @@ static void winbindd_getuserdomgroups_done(struct tevent_req *subreq); struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_gid_to_sid.c b/source3/winbindd/winbindd_gid_to_sid.c index b2cc3c2613fb..f8494d2df23f 100644 --- a/source3/winbindd/winbindd_gid_to_sid.c +++ b/source3/winbindd/winbindd_gid_to_sid.c @@ -30,6 +30,7 @@ static void winbindd_gid_to_sid_done(struct tevent_req *subreq); struct tevent_req *winbindd_gid_to_sid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_lookupname.c b/source3/winbindd/winbindd_lookupname.c index 0918076717c1..51358d5d9bc7 100644 --- a/source3/winbindd/winbindd_lookupname.c +++ b/source3/winbindd/winbindd_lookupname.c @@ -30,6 +30,7 @@ static void winbindd_lookupname_done(struct tevent_req *subreq); struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_lookupsid.c b/source3/winbindd/winbindd_lookupsid.c index 7647f1d68214..1281835bd3fd 100644 --- a/source3/winbindd/winbindd_lookupsid.c +++ b/source3/winbindd/winbindd_lookupsid.c @@ -32,7 +32,8 @@ static void winbindd_lookupsid_done(struct tevent_req *subreq); struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, - struct winbindd_request *request) + struct winbindd_cli_state *cli, + struct winbindd_request *request) { struct tevent_req *req, *subreq; struct winbindd_lookupsid_state *state; diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h index d462d8a6e1e7..5ef61ded42df 100644 --- a/source3/winbindd/winbindd_proto.h +++ b/source3/winbindd/winbindd_proto.h @@ -632,6 +632,7 @@ void winbindd_wins_byip(struct winbindd_cli_state *state); void winbindd_wins_byname(struct winbindd_cli_state *state); struct tevent_req *wb_ping_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS wb_ping_recv(struct tevent_req *req, struct winbindd_response *resp); @@ -652,7 +653,8 @@ NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, const char **name); struct tevent_req *winbindd_lookupsid_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, + struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_lookupsid_recv(struct tevent_req *req, struct winbindd_response *response); @@ -666,6 +668,7 @@ NTSTATUS wb_lookupname_recv(struct tevent_req *req, struct dom_sid *sid, struct tevent_req *winbindd_lookupname_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_lookupname_recv(struct tevent_req *req, struct winbindd_response *response); @@ -677,6 +680,7 @@ NTSTATUS wb_sid2uid_recv(struct tevent_req *req, uid_t *uid); struct tevent_req *winbindd_sid_to_uid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_sid_to_uid_recv(struct tevent_req *req, struct winbindd_response *response); @@ -688,6 +692,7 @@ NTSTATUS wb_sid2gid_recv(struct tevent_req *req, gid_t *gid); struct tevent_req *winbindd_sid_to_gid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_sid_to_gid_recv(struct tevent_req *req, struct winbindd_response *response); @@ -699,6 +704,7 @@ NTSTATUS wb_uid2sid_recv(struct tevent_req *req, struct dom_sid *sid); struct tevent_req *winbindd_uid_to_sid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_uid_to_sid_recv(struct tevent_req *req, struct winbindd_response *response); @@ -710,6 +716,7 @@ NTSTATUS wb_gid2sid_recv(struct tevent_req *req, struct dom_sid *sid); struct tevent_req *winbindd_gid_to_sid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_gid_to_sid_recv(struct tevent_req *req, struct winbindd_response *response); @@ -728,18 +735,21 @@ NTSTATUS wb_getpwsid_recv(struct tevent_req *req); struct tevent_req *winbindd_getpwsid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_getpwsid_recv(struct tevent_req *req, struct winbindd_response *response); struct tevent_req *winbindd_getpwnam_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_getpwnam_recv(struct tevent_req *req, struct winbindd_response *response); struct tevent_req *winbindd_getpwuid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_getpwuid_recv(struct tevent_req *req, struct winbindd_response *response); @@ -752,6 +762,7 @@ NTSTATUS wb_lookupuseraliases_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, uint32_t *num_aliases, uint32_t **aliases); struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_getsidaliases_recv(struct tevent_req *req, struct winbindd_response *response); @@ -764,6 +775,7 @@ NTSTATUS wb_lookupusergroups_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct tevent_req *winbindd_getuserdomgroups_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_getuserdomgroups_recv(struct tevent_req *req, struct winbindd_response *response); @@ -774,6 +786,7 @@ NTSTATUS wb_gettoken_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, int *num_sids, struct dom_sid **sids); struct tevent_req *winbindd_getgroups_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_getgroups_recv(struct tevent_req *req, struct winbindd_response *response); @@ -791,6 +804,7 @@ NTSTATUS wb_seqnums_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_show_sequence_recv(struct tevent_req *req, struct winbindd_response *response); @@ -813,12 +827,14 @@ NTSTATUS wb_getgrsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct tevent_req *winbindd_getgrgid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_getgrgid_recv(struct tevent_req *req, struct winbindd_response *response); struct tevent_req *winbindd_getgrnam_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request); NTSTATUS winbindd_getgrnam_recv(struct tevent_req *req, struct winbindd_response *response); diff --git a/source3/winbindd/winbindd_show_sequence.c b/source3/winbindd/winbindd_show_sequence.c index b40996ce3336..447706685e71 100644 --- a/source3/winbindd/winbindd_show_sequence.c +++ b/source3/winbindd/winbindd_show_sequence.c @@ -37,6 +37,7 @@ static void winbindd_show_sequence_done_all(struct tevent_req *subreq); struct tevent_req *winbindd_show_sequence_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_sid_to_gid.c b/source3/winbindd/winbindd_sid_to_gid.c index 323b44d7f9c7..1e712cfbee0c 100644 --- a/source3/winbindd/winbindd_sid_to_gid.c +++ b/source3/winbindd/winbindd_sid_to_gid.c @@ -29,6 +29,7 @@ static void winbindd_sid_to_gid_done(struct tevent_req *subreq); struct tevent_req *winbindd_sid_to_gid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_sid_to_uid.c b/source3/winbindd/winbindd_sid_to_uid.c index a6ff6cbaf4f0..43cb43255b20 100644 --- a/source3/winbindd/winbindd_sid_to_uid.c +++ b/source3/winbindd/winbindd_sid_to_uid.c @@ -29,6 +29,7 @@ static void winbindd_sid_to_uid_done(struct tevent_req *subreq); struct tevent_req *winbindd_sid_to_uid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq; diff --git a/source3/winbindd/winbindd_uid_to_sid.c b/source3/winbindd/winbindd_uid_to_sid.c index 151fffd296c4..467a1af96a38 100644 --- a/source3/winbindd/winbindd_uid_to_sid.c +++ b/source3/winbindd/winbindd_uid_to_sid.c @@ -30,6 +30,7 @@ static void winbindd_uid_to_sid_done(struct tevent_req *subreq); struct tevent_req *winbindd_uid_to_sid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, + struct winbindd_cli_state *cli, struct winbindd_request *request) { struct tevent_req *req, *subreq;