Ignore:
Timestamp:
Jun 16, 2009, 5:52:30 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 to 3.2.12

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/groupdb/mapping_ldb.c

    r228 r272  
    223223
    224224        ret = ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, NULL, &res);
     225        if (ret != LDB_SUCCESS) {
     226                goto failed;
     227        }
    225228        talloc_steal(dn, res);
    226         if (ret != LDB_SUCCESS || res->count != 1) {
     229        if (res->count != 1) {
    227230                goto failed;
    228231        }
     
    252255
    253256        ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res);
     257        if (ret != LDB_SUCCESS) {
     258                goto failed;
     259        }
    254260        talloc_steal(expr, res);
    255         if (ret != LDB_SUCCESS || res->count != 1) goto failed;
     261        if (res->count != 1) {
     262                goto failed;
     263        }
    256264       
    257265        if (!msg_to_group_map(res->msgs[0], map)) goto failed;
     
    278286
    279287        ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res);
     288        if (ret != LDB_SUCCESS) {
     289                goto failed;
     290        }
    280291        talloc_steal(expr, res);
    281         if (ret != LDB_SUCCESS || res->count != 1) goto failed;
     292        if (res->count != 1) {
     293                goto failed;
     294        }
    282295       
    283296        if (!msg_to_group_map(res->msgs[0], map)) goto failed;
     
    343356
    344357        ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, expr, NULL, &res);
     358        if (ret != LDB_SUCCESS) goto failed;
    345359        talloc_steal(tmp_ctx, res);
    346         if (ret != LDB_SUCCESS) goto failed;
    347360
    348361        (*pp_rmap) = NULL;
     
    396409
    397410        ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, attrs, &res);
     411        if (ret != LDB_SUCCESS) {
     412                goto failed;
     413        }
    398414        talloc_steal(expr, res);
    399         if (ret != LDB_SUCCESS) {
    400                 goto failed;
    401         }
    402415
    403416        for (i=0;i<res->count;i++) {
     
    517530
    518531        ret = ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, attrs, &res);
    519         talloc_steal(dn, res);
    520532        if (ret == LDB_SUCCESS && res->count == 0) {
     533                talloc_free(res);
    521534                talloc_free(dn);
    522535                return NT_STATUS_OK;
     
    526539                return NT_STATUS_INTERNAL_DB_CORRUPTION;
    527540        }
     541        talloc_steal(dn, res);
    528542
    529543        el = ldb_msg_find_element(res->msgs[0], "member");
    530544        if (el == NULL) {
    531545                talloc_free(dn);
    532                 return NT_STATUS_INTERNAL_DB_CORRUPTION;
     546                return NT_STATUS_OK;
    533547        }
    534548       
Note: See TracChangeset for help on using the changeset viewer.