Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source4/rpc_server/unixinfo/dcesrv_unixinfo.c

    r414 r745  
    5050                                                dce_call->context->private_data,
    5151                                                struct wbc_context);
    52         struct id_mapping *ids;
     52        struct id_map *ids;
    5353        struct composite_context *ctx;
    5454
    5555        DEBUG(5, ("dcesrv_unixinfo_SidToUid called\n"));
    5656
    57         ids = talloc(mem_ctx, struct  id_mapping);
     57        ids = talloc(mem_ctx, struct id_map);
    5858        NT_STATUS_HAVE_NO_MEMORY(ids);
    5959
    6060        ids->sid = &r->in.sid;
    61         ids->status = NT_STATUS_NONE_MAPPED;
    62         ids->unixid = NULL;
     61        ids->status = ID_UNKNOWN;
     62        ZERO_STRUCT(ids->xid);
    6363        ctx = wbc_sids_to_xids_send(wbc_ctx, ids, 1, ids);
    6464        NT_STATUS_HAVE_NO_MEMORY(ctx);
     
    6767        NT_STATUS_NOT_OK_RETURN(status);
    6868
    69         if (ids->unixid->type == ID_TYPE_BOTH ||
    70             ids->unixid->type == ID_TYPE_UID) {
    71                 *r->out.uid = ids->unixid->id;
     69        if (ids->xid.type == ID_TYPE_BOTH ||
     70            ids->xid.type == ID_TYPE_UID) {
     71                *r->out.uid = ids->xid.id;
    7272                return NT_STATUS_OK;
    7373        } else {
     
    8383                                                dce_call->context->private_data,
    8484                                                struct wbc_context);
    85         struct id_mapping *ids;
     85        struct id_map *ids;
    8686        struct composite_context *ctx;
    8787        uint32_t uid;
     
    9696        }
    9797
    98         ids = talloc(mem_ctx, struct id_mapping);
     98        ids = talloc(mem_ctx, struct id_map);
    9999        NT_STATUS_HAVE_NO_MEMORY(ids);
    100100
    101101        ids->sid = NULL;
    102         ids->status = NT_STATUS_NONE_MAPPED;
    103         ids->unixid = talloc(ids, struct unixid);
    104         NT_STATUS_HAVE_NO_MEMORY(ids->unixid);
    105 
    106         ids->unixid->id = uid;
    107         ids->unixid->type = ID_TYPE_UID;
     102        ids->status = ID_UNKNOWN;
     103
     104        ids->xid.id = uid;
     105        ids->xid.type = ID_TYPE_UID;
    108106
    109107        ctx = wbc_xids_to_sids_send(wbc_ctx, ids, 1, ids);
     
    125123                                                dce_call->context->private_data,
    126124                                                struct wbc_context);
    127         struct id_mapping *ids;
     125        struct id_map *ids;
    128126        struct composite_context *ctx;
    129127
    130128        DEBUG(5, ("dcesrv_unixinfo_SidToGid called\n"));
    131129
    132         ids = talloc(mem_ctx, struct  id_mapping);
     130        ids = talloc(mem_ctx, struct id_map);
    133131        NT_STATUS_HAVE_NO_MEMORY(ids);
    134132
    135133        ids->sid = &r->in.sid;
    136         ids->status = NT_STATUS_NONE_MAPPED;
    137         ids->unixid = NULL;
     134        ids->status = ID_UNKNOWN;
     135        ZERO_STRUCT(ids->xid);
    138136        ctx = wbc_sids_to_xids_send(wbc_ctx, ids, 1, ids);
    139137        NT_STATUS_HAVE_NO_MEMORY(ctx);
     
    142140        NT_STATUS_NOT_OK_RETURN(status);
    143141
    144         if (ids->unixid->type == ID_TYPE_BOTH ||
    145             ids->unixid->type == ID_TYPE_GID) {
    146                 *r->out.gid = ids->unixid->id;
     142        if (ids->xid.type == ID_TYPE_BOTH ||
     143            ids->xid.type == ID_TYPE_GID) {
     144                *r->out.gid = ids->xid.id;
    147145                return NT_STATUS_OK;
    148146        } else {
     
    158156                                                dce_call->context->private_data,
    159157                                                struct wbc_context);
    160         struct id_mapping *ids;
     158        struct id_map *ids;
    161159        struct composite_context *ctx;
    162160        uint32_t gid;
     
    171169        }
    172170
    173         ids = talloc(mem_ctx, struct id_mapping);
     171        ids = talloc(mem_ctx, struct id_map);
    174172        NT_STATUS_HAVE_NO_MEMORY(ids);
    175173
    176174        ids->sid = NULL;
    177         ids->status = NT_STATUS_NONE_MAPPED;
    178         ids->unixid = talloc(ids, struct unixid);
    179         NT_STATUS_HAVE_NO_MEMORY(ids->unixid);
    180 
    181         ids->unixid->id = gid;
    182         ids->unixid->type = ID_TYPE_GID;
     175        ids->status = ID_UNKNOWN;
     176
     177        ids->xid.id = gid;
     178        ids->xid.type = ID_TYPE_GID;
    183179
    184180        ctx = wbc_xids_to_sids_send(wbc_ctx, ids, 1, ids);
     
    196192                                  struct unixinfo_GetPWUid *r)
    197193{
    198         int i;
     194        unsigned int i;
    199195
    200196        *r->out.count = 0;
Note: See TracChangeset for help on using the changeset viewer.