s3:winbind: The get[gr|pw]end functions need access to the client state
authorVolker Lendecke <vl@samba.org>
Sun, 16 Aug 2009 10:46:55 +0000 (12:46 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 16 Aug 2009 11:28:14 +0000 (13:28 +0200)
18 files changed:
source3/winbindd/wb_ping.c
source3/winbindd/winbindd.c
source3/winbindd/winbindd_getgrgid.c
source3/winbindd/winbindd_getgrnam.c
source3/winbindd/winbindd_getgroups.c
source3/winbindd/winbindd_getpwnam.c
source3/winbindd/winbindd_getpwsid.c
source3/winbindd/winbindd_getpwuid.c
source3/winbindd/winbindd_getsidaliases.c
source3/winbindd/winbindd_getuserdomgroups.c
source3/winbindd/winbindd_gid_to_sid.c
source3/winbindd/winbindd_lookupname.c
source3/winbindd/winbindd_lookupsid.c
source3/winbindd/winbindd_proto.h
source3/winbindd/winbindd_show_sequence.c
source3/winbindd/winbindd_sid_to_gid.c
source3/winbindd/winbindd_sid_to_uid.c
source3/winbindd/winbindd_uid_to_sid.c

index 12013984376b06b2c08d77f1b73db1fb35419d8d..bfba3c168bbbc2c9d37b994a804bf2e3335ca7ca 100644 (file)
@@ -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;
index 554cb0a30a614007b2a79756f12527afae4689ba..1a76f87463e716a8ef7c4b94b11185a6966e0f83 100644 (file)
@@ -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));
index 82204ad09558ca42c481bd3b94682c7f8b305af6..4feebdb4f6ea96a1bf2cc51bdbd3a9e9a2eb1acf 100644 (file)
@@ -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;
index 85e60a27578f03ead8209d750460bf057b752b7b..d55796513fad00af5c600382430453bd970e52c1 100644 (file)
@@ -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;
index 9e6465696e83e63165c8cb08581a89734c6673ac..3bdf762c458e85a9ef004fb422b33f58971bb8b0 100644 (file)
@@ -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;
index 80b618c4aa81fe022ea25ca47e89c3cca7d616cc..77e827e24151ddb2825947ff8b7a242a7346e774 100644 (file)
@@ -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;
index 135cbf6f61f886295523bd957c615367bd298303..055de17f91a73b982a87b1ca8c0074f8ee8f4d74 100644 (file)
@@ -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;
index 0c667cfcccee72d5f0e7beb0bd618fe38744082f..d47c0852143f8dafb39141f1b3368dce6f375d44 100644 (file)
@@ -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;
index 788c88f5506c90cd9977734af6e296fd62802f4b..6755fa149f0299e6792221abbb59717be526a942 100644 (file)
@@ -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;
index e67768307ff17a6f79969bbb89032e15eee81586..0bba0248624071785c7f80f935b273f909d23cc1 100644 (file)
@@ -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;
index b2cc3c2613fb3b32d2ba667cfd550d8bb97f3dc0..f8494d2df23fd1814c72e3470fb0c7fc0780347d 100644 (file)
@@ -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;
index 0918076717c1399d64ef92985b89272ebba553e1..51358d5d9bc7867bd13a64891448a9a043b57bf7 100644 (file)
@@ -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;
index 7647f1d6821436c087f818a1ecb15a0622b91c43..1281835bd3fd88ef9adaa6be5ebc3b95f38b72eb 100644 (file)
@@ -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;
index d462d8a6e1e7633dfca9f7e94241455690739a0c..5ef61ded42dfeb68434f807fb462b502e69e2cda 100644 (file)
@@ -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);
index b40996ce3336731939fcd87c576f6c12aa7015f2..447706685e713a6bbad3646629f1c34d7449de67 100644 (file)
@@ -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;
index 323b44d7f9c74e9a67ef853c82960082bba6075e..1e712cfbee0c098303c098507f3fb1bc5b636eda 100644 (file)
@@ -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;
index a6ff6cbaf4f07df48c1c823c62a94748f9b82404..43cb43255b20c4a8a1b79c21c404dfd197a705f0 100644 (file)
@@ -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;
index 151fffd296c452ad6b5e6e662750d286683f6f3f..467a1af96a3885be796783582bb82e275473f27a 100644 (file)
@@ -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;