svn commit: samba r8542 - branches/SAMBA_3_0/source/passdb trunk/source/passdb

gd at samba.org gd at samba.org
Mon Jul 18 13:16:54 GMT 2005


Author: gd
Date: 2005-07-18 13:16:52 +0000 (Mon, 18 Jul 2005)
New Revision: 8542

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8542

Log:
- (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

Modified:
   branches/SAMBA_3_0/source/passdb/pdb_ldap.c
   trunk/source/passdb/pdb_ldap.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_ldap.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/pdb_ldap.c	2005-07-18 10:01:58 UTC (rev 8541)
+++ branches/SAMBA_3_0/source/passdb/pdb_ldap.c	2005-07-18 13:16:52 UTC (rev 8542)
@@ -3609,7 +3609,7 @@
 	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 @@
 	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();

Modified: trunk/source/passdb/pdb_ldap.c
===================================================================
--- trunk/source/passdb/pdb_ldap.c	2005-07-18 10:01:58 UTC (rev 8541)
+++ trunk/source/passdb/pdb_ldap.c	2005-07-18 13:16:52 UTC (rev 8542)
@@ -3997,7 +3997,7 @@
 	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;
 	}
 
@@ -4023,7 +4023,7 @@
 	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();



More information about the samba-cvs mailing list