1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r8542: - (re-)add better search-semantics: look for Interdomain trust accounts

below the machine-suffix (this is where we create them)) to avoid
  digging through thousands of user-accounts just to find a handful of
  trust-accounts in the enumdomusers-samr-call.

- don't access freed data in DEBUG-statement

Guenther
(This used to be commit 793c82c017)
This commit is contained in:
Günther Deschner 2005-07-18 13:16:52 +00:00 committed by Gerald (Jerry) Carter
parent 8449a93928
commit 235bece8ff

View File

@ -3609,7 +3609,7 @@ static BOOL ldapuser2displayentry(struct ldap_search_state *state,
ldap_value_free(vals);
if (!sid_peek_check_rid(get_global_sam_sid(), &sid, &result->rid)) {
DEBUG(0, ("%s is not our domain\n", vals[0]));
DEBUG(0, ("sid %s does not belong to our domain\n", sid_string_static(&sid)));
return False;
}
@ -3635,7 +3635,7 @@ static BOOL ldapsam_search_users(struct pdb_methods *methods,
if ((acct_flags != 0) && ((acct_flags & ACB_NORMAL) != 0))
state->base = lp_ldap_user_suffix();
else if ((acct_flags != 0) &&
((acct_flags & (ACB_WSTRUST|ACB_SVRTRUST)) != 0))
((acct_flags & (ACB_WSTRUST|ACB_SVRTRUST|ACB_DOMTRUST)) != 0))
state->base = lp_ldap_machine_suffix();
else
state->base = lp_ldap_suffix();