Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (12 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified vendor/current/source4/winbind/wb_sids2xids.c

    r414 r740  
    2424#include "winbind/wb_server.h"
    2525#include "smbd/service_task.h"
    26 #include "winbind/wb_helper.h"
    27 #include "libcli/security/proto.h"
    28 #include "winbind/idmap.h"
    2926
    3027struct sids2xids_state {
    3128        struct composite_context *ctx;
    3229        struct wbsrv_service *service;
    33         struct id_mapping *ids;
     30        struct id_map *ids;
    3431        int count;
    3532};
     
    3734struct composite_context *wb_sids2xids_send(TALLOC_CTX *mem_ctx,
    3835                                            struct wbsrv_service *service,
    39                                             int count, struct id_mapping *ids)
     36                                            unsigned int count, struct id_map *ids)
    4037{
    4138        struct composite_context *result;
    4239        struct sids2xids_state *state;
     40        struct id_map **pointer_array;
     41        unsigned int i;
    4342
    4443        DEBUG(5, ("wb_sids2xids_send called\n"));
     
    5655        state->ids = ids;
    5756
     57        /* We need to convert between calling conventions here - the
     58         * values are filled in by reference, so we just need to
     59         * provide pointers to them */
     60        pointer_array = talloc_array(state, struct id_map *, count+1);
     61        if (composite_nomem(pointer_array, result)) return result;
     62
     63        for (i=0; i < count; i++) {
     64                pointer_array[i] = &ids[i];
     65        }
     66        pointer_array[i] = NULL;
     67
    5868        state->ctx->status = idmap_sids_to_xids(service->idmap_ctx, mem_ctx,
    59                                                 count, state->ids);
     69                                                pointer_array);
    6070        if (!composite_is_ok(state->ctx)) return result;
    6171
     
    6575
    6676NTSTATUS wb_sids2xids_recv(struct composite_context *ctx,
    67                            struct id_mapping **ids)
     77                           struct id_map **ids)
    6878{
    6979        NTSTATUS status = composite_wait(ctx);
     
    7383        DEBUG(5, ("wb_sids2xids_recv called\n"));
    7484
     85        /* We don't have to mess with pointer_array on the way out, as
     86         * the results are filled into the pointers the caller
     87         * supplied */
    7588        *ids = state->ids;
    7689
Note: See TracChangeset for help on using the changeset viewer.