Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source4/libnet/groupinfo.c

    r860 r988  
    3232
    3333struct groupinfo_state {
    34         struct dcerpc_pipe         *pipe;
     34        struct dcerpc_binding_handle *binding_handle;
    3535        struct policy_handle       domain_handle;
    3636        struct policy_handle       group_handle;
     
    8888                s->monitor_fn(&msg);
    8989        }
    90 
     90       
    9191        /* have we actually got name resolved
    9292           - we're looking for only one at the moment */
     
    110110        /* send request */
    111111        subreq = dcerpc_samr_OpenGroup_r_send(s, c->event_ctx,
    112                                               s->pipe->binding_handle,
     112                                              s->binding_handle,
    113113                                              &s->opengroup);
    114114        if (composite_nomem(subreq, c)) return;
     
    136136        if (!composite_is_ok(c)) return;
    137137
    138         if (!NT_STATUS_IS_OK(s->querygroupinfo.out.result)) {
    139                 composite_error(c, s->querygroupinfo.out.result);
     138        if (!NT_STATUS_IS_OK(s->opengroup.out.result)) {
     139                composite_error(c, s->opengroup.out.result);
    140140                return;
    141141        }
     
    162162        subreq = dcerpc_samr_QueryGroupInfo_r_send(s,
    163163                                                   c->event_ctx,
    164                                                    s->pipe->binding_handle,
     164                                                   s->binding_handle,
    165165                                                   &s->querygroupinfo);
    166166        if (composite_nomem(subreq, c)) return;
     
    213213        /* queue rpc call, set event handling and new state */
    214214        subreq = dcerpc_samr_Close_r_send(s, c->event_ctx,
    215                                           s->pipe->binding_handle,
     215                                          s->binding_handle,
    216216                                          &s->samrclose);
    217217        if (composite_nomem(subreq, c)) return;
     
    265265 * @param io arguments and results of the call
    266266 */
    267 struct composite_context *libnet_rpc_groupinfo_send(struct dcerpc_pipe *p,
     267struct composite_context *libnet_rpc_groupinfo_send(TALLOC_CTX *mem_ctx,
     268                                                    struct tevent_context *ev,
     269                                                    struct dcerpc_binding_handle *b,
    268270                                                    struct libnet_rpc_groupinfo *io,
    269271                                                    void (*monitor)(struct monitor_msg*))
     
    274276        struct tevent_req *subreq;
    275277
    276         if (!p || !io) return NULL;
    277        
    278         c = composite_create(p, dcerpc_event_context(p));
     278        if (!b || !io) return NULL;
     279       
     280        c = composite_create(mem_ctx, ev);
    279281        if (c == NULL) return c;
    280282       
     
    285287
    286288        s->level         = io->in.level;
    287         s->pipe          = p;
     289        s->binding_handle= b;
    288290        s->domain_handle = io->in.domain_handle;
    289291        s->monitor_fn    = monitor;
     
    300302                /* send request */
    301303                subreq = dcerpc_samr_OpenGroup_r_send(s, c->event_ctx,
    302                                                       p->binding_handle,
     304                                                      s->binding_handle,
    303305                                                      &s->opengroup);
    304306                if (composite_nomem(subreq, c)) return c;
     
    322324                /* send request */
    323325                subreq = dcerpc_samr_LookupNames_r_send(s, c->event_ctx,
    324                                                         p->binding_handle,
     326                                                        s->binding_handle,
    325327                                                        &s->lookup);
    326328                if (composite_nomem(subreq, c)) return c;
     
    372374 */
    373375
    374 NTSTATUS libnet_rpc_groupinfo(struct dcerpc_pipe *p,
     376NTSTATUS libnet_rpc_groupinfo(struct tevent_context *ev,
     377                              struct dcerpc_binding_handle *b,
    375378                              TALLOC_CTX *mem_ctx,
    376379                              struct libnet_rpc_groupinfo *io)
    377380{
    378         struct composite_context *c = libnet_rpc_groupinfo_send(p, io, NULL);
     381        struct composite_context *c = libnet_rpc_groupinfo_send(mem_ctx, ev, b,
     382                                                                io, NULL);
    379383        return libnet_rpc_groupinfo_recv(c, mem_ctx, io);
    380384}
Note: See TracChangeset for help on using the changeset viewer.