Ignore:
Timestamp:
May 13, 2014, 11:39:04 AM (11 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update trunk to 3.6.23

Location:
trunk/server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/rpcclient/cmd_lsarpc.c

    r751 r862  
    324324        uint32_t num_names;
    325325        struct lsa_String *names;
    326         struct lsa_RefDomainList *domains;
     326        struct lsa_RefDomainList *domains = NULL;
    327327        struct lsa_TransSidArray3 sids;
    328328        uint32_t count = 0;
     
    362362        }
    363363
     364        if (sids.count != num_names) {
     365                return NT_STATUS_INVALID_NETWORK_RESPONSE;
     366        }
     367
    364368        for (i = 0; i < sids.count; i++) {
    365369                fstring sid_str;
     
    451455        int i;
    452456        struct lsa_SidArray sids;
    453         struct lsa_RefDomainList *domains;
     457        struct lsa_RefDomainList *domains = NULL;
    454458        struct lsa_TransNameArray2 names;
    455459        uint32_t count = 0;
     
    507511        /* Print results */
    508512
    509         for (i = 0; i < count; i++) {
     513        for (i = 0; i < names.count; i++) {
    510514                fstring sid_str;
    511515
     516                if (i >= sids.num_sids) {
     517                        break;
     518                }
    512519                sid_to_fstring(sid_str, sids.sids[i].sid);
    513520                printf("%s %s (%d)\n", sid_str,
  • trunk/server/source3/rpcclient/cmd_samr.c

    r745 r862  
    386386                        goto done;
    387387                }
     388
    388389                if (NT_STATUS_IS_OK(result)) {
     390                        if (rids.count != 1) {
     391                                status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     392                                goto done;
     393                        }
     394                        if (types.count != 1) {
     395                                status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     396                                goto done;
     397                        }
     398
    389399                        status = dcerpc_samr_OpenUser(b, mem_ctx,
    390400                                                      &domain_pol,
     
    14511461                }
    14521462                if (NT_STATUS_IS_OK(result)) {
     1463                        if (rids.count != 1) {
     1464                                status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     1465                                goto done;
     1466                        }
     1467                        if (types.count != 1) {
     1468                                status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     1469                                goto done;
     1470                        }
     1471
    14531472                        status = dcerpc_samr_OpenAlias(b, mem_ctx,
    14541473                                                       &domain_pol,
     
    21132132                goto done;
    21142133        }
     2134        if (rids.count != num_names) {
     2135                status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     2136                goto done;
     2137        }
     2138        if (name_types.count != num_names) {
     2139                status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     2140                goto done;
     2141        }
    21152142
    21162143        /* Display results */
     
    21942221
    21952222        /* Display results */
     2223        if (num_rids != names.count) {
     2224                status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     2225                goto done;
     2226        }
     2227        if (num_rids != types.count) {
     2228                status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     2229                goto done;
     2230        }
    21962231
    21972232        for (i = 0; i < num_rids; i++) {
     
    22702305                        goto done;
    22712306                }
     2307                if (group_rids.count != 1) {
     2308                        status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     2309                        goto done;
     2310                }
     2311                if (name_types.count != 1) {
     2312                        status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     2313                        goto done;
     2314                }
    22722315
    22732316                status = dcerpc_samr_OpenGroup(b, mem_ctx,
     
    23732416                        goto done;
    23742417                }
     2418                if (user_rids.count != 1) {
     2419                        status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     2420                        goto done;
     2421                }
     2422                if (name_types.count != 1) {
     2423                        status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     2424                        goto done;
     2425                }
    23752426
    23762427                status = dcerpc_samr_OpenUser(b, mem_ctx,
     
    27572808        if (!NT_STATUS_IS_OK(result)) {
    27582809                status = result;
     2810                goto done;
     2811        }
     2812        if (rids.count != 1) {
     2813                status = NT_STATUS_INVALID_NETWORK_RESPONSE;
     2814                goto done;
     2815        }
     2816        if (types.count != 1) {
     2817                status = NT_STATUS_INVALID_NETWORK_RESPONSE;
    27592818                goto done;
    27602819        }
     
    31623221                        return result;
    31633222                }
    3164 
     3223                if (rids.count != 1) {
     3224                        return NT_STATUS_INVALID_NETWORK_RESPONSE;
     3225                }
     3226                if (types.count != 1) {
     3227                        return NT_STATUS_INVALID_NETWORK_RESPONSE;
     3228                }
    31653229
    31663230                status = dcerpc_samr_OpenUser(b, mem_ctx,
Note: See TracChangeset for help on using the changeset viewer.