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/source3/winbindd/winbindd_getsidaliases.c

    r414 r745  
    2020#include "includes.h"
    2121#include "winbindd.h"
     22#include "../libcli/security/security.h"
    2223
    2324struct winbindd_getsidaliases_state {
     
    3738        struct winbindd_getsidaliases_state *state;
    3839        struct winbindd_domain *domain;
    39         size_t num_sids;
     40        uint32_t num_sids;
    4041        struct dom_sid *sids;
    4142
     
    6970        sids = NULL;
    7071
    71         if ((request->extra_data.data != NULL)
    72             && !parse_sidlist(state, request->extra_data.data,
    73                               &sids, &num_sids)) {
    74                 DEBUG(1, ("Could not parse SID list: %s\n",
    75                           request->extra_data.data));
    76                 tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
    77                 return tevent_req_post(req, ev);
     72        if (request->extra_data.data != NULL) {
     73                if (request->extra_data.data[request->extra_len-1] != '\0') {
     74                        DEBUG(1, ("Got non-NULL terminated sidlist\n"));
     75                        tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
     76                        return tevent_req_post(req, ev);
     77                }
     78                if (!parse_sidlist(state, request->extra_data.data,
     79                                   &sids, &num_sids)) {
     80                        DEBUG(1, ("Could not parse SID list: %s\n",
     81                                  request->extra_data.data));
     82                        tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
     83                        return tevent_req_post(req, ev);
     84                }
     85        }
     86
     87        if (DEBUGLEVEL >= 10) {
     88                size_t i;
     89                for (i=0; i<num_sids; i++) {
     90                        fstring sidstr;
     91                        sid_to_fstring(sidstr, &sids[i]);
     92                        DEBUGADD(10, ("%s\n", sidstr));
     93                }
    7894        }
    7995
     
    97113                                           &state->aliases);
    98114        TALLOC_FREE(subreq);
    99         if (!NT_STATUS_IS_OK(status)) {
    100                 tevent_req_nterror(req, status);
     115        if (tevent_req_nterror(req, status)) {
    101116                return;
    102117        }
Note: See TracChangeset for help on using the changeset viewer.