Changeset 862 for trunk/server/source3/rpcclient
- Timestamp:
- May 13, 2014, 11:39:04 AM (11 years ago)
- Location:
- trunk/server
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 860
- Property svn:mergeinfo changed
-
trunk/server/source3/rpcclient/cmd_lsarpc.c
r751 r862 324 324 uint32_t num_names; 325 325 struct lsa_String *names; 326 struct lsa_RefDomainList *domains ;326 struct lsa_RefDomainList *domains = NULL; 327 327 struct lsa_TransSidArray3 sids; 328 328 uint32_t count = 0; … … 362 362 } 363 363 364 if (sids.count != num_names) { 365 return NT_STATUS_INVALID_NETWORK_RESPONSE; 366 } 367 364 368 for (i = 0; i < sids.count; i++) { 365 369 fstring sid_str; … … 451 455 int i; 452 456 struct lsa_SidArray sids; 453 struct lsa_RefDomainList *domains ;457 struct lsa_RefDomainList *domains = NULL; 454 458 struct lsa_TransNameArray2 names; 455 459 uint32_t count = 0; … … 507 511 /* Print results */ 508 512 509 for (i = 0; i < count; i++) {513 for (i = 0; i < names.count; i++) { 510 514 fstring sid_str; 511 515 516 if (i >= sids.num_sids) { 517 break; 518 } 512 519 sid_to_fstring(sid_str, sids.sids[i].sid); 513 520 printf("%s %s (%d)\n", sid_str, -
trunk/server/source3/rpcclient/cmd_samr.c
r745 r862 386 386 goto done; 387 387 } 388 388 389 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 389 399 status = dcerpc_samr_OpenUser(b, mem_ctx, 390 400 &domain_pol, … … 1451 1461 } 1452 1462 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 1453 1472 status = dcerpc_samr_OpenAlias(b, mem_ctx, 1454 1473 &domain_pol, … … 2113 2132 goto done; 2114 2133 } 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 } 2115 2142 2116 2143 /* Display results */ … … 2194 2221 2195 2222 /* 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 } 2196 2231 2197 2232 for (i = 0; i < num_rids; i++) { … … 2270 2305 goto done; 2271 2306 } 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 } 2272 2315 2273 2316 status = dcerpc_samr_OpenGroup(b, mem_ctx, … … 2373 2416 goto done; 2374 2417 } 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 } 2375 2426 2376 2427 status = dcerpc_samr_OpenUser(b, mem_ctx, … … 2757 2808 if (!NT_STATUS_IS_OK(result)) { 2758 2809 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; 2759 2818 goto done; 2760 2819 } … … 3162 3221 return result; 3163 3222 } 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 } 3165 3229 3166 3230 status = dcerpc_samr_OpenUser(b, mem_ctx,
Note:
See TracChangeset
for help on using the changeset viewer.