The branch, master has been updated
       via  0e21b4f... Revert "s4/dsdb: Fixed partition_search() not to pass 
special DN's to LDAP backend."
       via  2198831... Revert "s4/auth: Fixed authsam_expand_nested_groups() to 
find entry SID if not available in the DN."
      from  1662e38... s4-smbtorture: add NDR torture test for 
winreg_QueryMultipleValues2.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0e21b4ffa067237ed2c3037216c14a955f339e51
Author: Matthias Dieter Wallnöfer <[email protected]>
Date:   Tue Jun 29 14:48:25 2010 +0200

    Revert "s4/dsdb: Fixed partition_search() not to pass special DN's to LDAP 
backend."
    
    This reverts commit ed4c107bc1eac8531fdd8d09f7698efcbc7ecb14.
    
    See post "Endi's Bug 7530 patches (LDAP backend)" on samba-technical.

commit 2198831e6b7c112b8f7551fccb25305742636df2
Author: Matthias Dieter Wallnöfer <[email protected]>
Date:   Tue Jun 29 14:52:43 2010 +0200

    Revert "s4/auth: Fixed authsam_expand_nested_groups() to find entry SID if 
not available in the DN."
    
    This reverts commit fa9557fee3ca546878d99b77f1ff37f724c37024.
    
    See post "Endi's Bug 7530 patches (LDAP backend)" on samba-technical.

-----------------------------------------------------------------------

Summary of changes:
 source4/auth/sam.c                         |   25 ++++---------------------
 source4/dsdb/samdb/ldb_modules/partition.c |   14 ++++++--------
 2 files changed, 10 insertions(+), 29 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/sam.c b/source4/auth/sam.c
index cf2e219..7a776b9 100644
--- a/source4/auth/sam.c
+++ b/source4/auth/sam.c
@@ -305,7 +305,7 @@ NTSTATUS authsam_expand_nested_groups(struct ldb_context 
*sam_ctx,
        struct ldb_dn *dn;
        struct dom_sid sid;
        TALLOC_CTX *tmp_ctx;
-       struct ldb_result *res = NULL;
+       struct ldb_result *res;
        NTSTATUS status;
        const struct ldb_message_element *el;
 
@@ -321,22 +321,9 @@ NTSTATUS authsam_expand_nested_groups(struct ldb_context 
*sam_ctx,
                return NT_STATUS_INTERNAL_DB_CORRUPTION;
        }
 
-       /* We expect an extended DN with the SID included but we can fallback
-        * to search the extended components if they weren't provided. */
        status = dsdb_get_extended_dn_sid(dn, &sid, "SID");
        if (!NT_STATUS_IS_OK(status)) {
-               ret = dsdb_search_dn(sam_ctx, tmp_ctx, &res, dn, attrs,
-                                    DSDB_SEARCH_SHOW_EXTENDED_DN);
-               if (ret != LDB_SUCCESS) {
-                       talloc_free(tmp_ctx);
-                       return NT_STATUS_INTERNAL_DB_CORRUPTION;
-               }
-               dn = res->msgs[0]->dn;
-               status = dsdb_get_extended_dn_sid(dn, &sid, "SID");
-       }
-
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0, (__location__ ": when parsing DN %s we failed to find 
or SID component, so we cannot calculate the group token: %s\n",
+               DEBUG(0, (__location__ ": when parsing DN %s we failed to find 
our SID component, so we cannot calculate the group token: %s\n",
                          ldb_dn_get_extended_linearized(tmp_ctx, dn, 1), 
                          nt_errstr(status)));
                talloc_free(tmp_ctx);
@@ -344,12 +331,8 @@ NTSTATUS authsam_expand_nested_groups(struct ldb_context 
*sam_ctx,
        }
 
        if (only_childs) {
-               /* If we didn't get the SID as extended DN then we already have
-                * performed exactly this search. */
-               if (res == NULL) {
-                       ret = dsdb_search_dn(sam_ctx, tmp_ctx, &res, dn, attrs,
-                                            DSDB_SEARCH_SHOW_EXTENDED_DN);
-               }
+               ret = dsdb_search_dn(sam_ctx, tmp_ctx, &res, dn, attrs,
+                                    DSDB_SEARCH_SHOW_EXTENDED_DN);
        } else {
                /* This is an O(n^2) linear search */
                already_there = sids_contains_sid((const struct dom_sid**) 
*res_sids,
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c 
b/source4/dsdb/samdb/ldb_modules/partition.c
index d022d12..ba695d2 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -470,14 +470,12 @@ static int partition_search(struct ldb_module *module, 
struct ldb_request *req)
                return ret;
        }
 
-       if (!ldb_dn_is_special(req->op.search.base)) {
-               p = find_partition(data, NULL, req);
-               if (p != NULL) {
-                       /* the caller specified what partition they want the
-                       * search - just pass it on
-                       */
-                       return ldb_next_request(p->module, req);
-               }
+       p = find_partition(data, NULL, req);
+       if (p != NULL) {
+               /* the caller specified what partition they want the
+                * search - just pass it on
+                */
+               return ldb_next_request(p->module, req);
        }
 
        /* Get back the search options from the search control, and mark it as


-- 
Samba Shared Repository

Reply via email to