Changeset 272 for branches/samba-3.2.x/source/groupdb
- Timestamp:
- Jun 16, 2009, 5:52:30 PM (17 years ago)
- File:
-
- 1 edited
-
branches/samba-3.2.x/source/groupdb/mapping_ldb.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/groupdb/mapping_ldb.c
r228 r272 223 223 224 224 ret = ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, NULL, &res); 225 226 227 225 228 talloc_steal(dn, res); 226 if (re t != LDB_SUCCESS || res->count != 1) {229 if (res->count != 1) { 227 230 goto failed; 228 231 } … … 252 255 253 256 ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res); 257 258 259 254 260 talloc_steal(expr, res); 255 if (ret != LDB_SUCCESS || res->count != 1) goto failed; 261 if (res->count != 1) { 262 goto failed; 263 } 256 264 257 265 if (!msg_to_group_map(res->msgs[0], map)) goto failed; … … 278 286 279 287 ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res); 288 289 290 280 291 talloc_steal(expr, res); 281 if (ret != LDB_SUCCESS || res->count != 1) goto failed; 292 if (res->count != 1) { 293 goto failed; 294 } 282 295 283 296 if (!msg_to_group_map(res->msgs[0], map)) goto failed; … … 343 356 344 357 ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, expr, NULL, &res); 358 345 359 talloc_steal(tmp_ctx, res); 346 if (ret != LDB_SUCCESS) goto failed;347 360 348 361 (*pp_rmap) = NULL; … … 396 409 397 410 ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, attrs, &res); 411 412 413 398 414 talloc_steal(expr, res); 399 if (ret != LDB_SUCCESS) {400 goto failed;401 }402 415 403 416 for (i=0;i<res->count;i++) { … … 517 530 518 531 ret = ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, attrs, &res); 519 talloc_steal(dn, res);520 532 if (ret == LDB_SUCCESS && res->count == 0) { 533 521 534 talloc_free(dn); 522 535 return NT_STATUS_OK; … … 526 539 return NT_STATUS_INTERNAL_DB_CORRUPTION; 527 540 } 541 528 542 529 543 el = ldb_msg_find_element(res->msgs[0], "member"); 530 544 if (el == NULL) { 531 545 talloc_free(dn); 532 return NT_STATUS_ INTERNAL_DB_CORRUPTION;546 return NT_STATUS_; 533 547 } 534 548
Note:
See TracChangeset
for help on using the changeset viewer.
