[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Mon Oct 25 13:38:01 MDT 2010


The branch, master has been updated
       via  33f65a9 s4:samr RPC server - "dcesrv_samr_info_DomGeneralInformation" - count always all type of groups
       via  83c3813 s4:samr RPC server - remove a somewhat pointless comment
      from  6fb64b9 s4:"samdb_search_count" - introduce a "mem_ctx" parameter

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


- Log -----------------------------------------------------------------
commit 33f65a93fe905d60d8fca85327ddbbf3f8c7fe6e
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Mon Oct 25 20:48:18 2010 +0200

    s4:samr RPC server - "dcesrv_samr_info_DomGeneralInformation" - count always all type of groups
    
    One pair are universal an global groups (on the SAMR pipe called "groups") and
    the other one are the domain and builtin local groups (on the SAMR pipe called
    "aliases").
    
    Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
    Autobuild-Date: Mon Oct 25 19:37:27 UTC 2010 on sn-devel-104

commit 83c381385cf7d3787497a1adc78bb80e2e9c2e21
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Mon Oct 25 20:39:05 2010 +0200

    s4:samr RPC server - remove a somewhat pointless comment
    
    Regardless if groups and users do exist in the builtin domain or not we do
    count always all users, groups and aliases.

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

Summary of changes:
 source4/rpc_server/samr/dcesrv_samr.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index cef580e..e419485 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -519,17 +519,18 @@ static NTSTATUS dcesrv_samr_info_DomGeneralInformation(struct samr_domain_state
 		break;
 	}
 
-	/* No users in BUILTIN, and the LOCAL group types are only in builtin, and the global group type is never in BUILTIN */
 	info->num_users = samdb_search_count(state->sam_ctx, mem_ctx,
 					     state->domain_dn,
 					     "(objectClass=user)");
 	info->num_groups = samdb_search_count(state->sam_ctx, mem_ctx,
 					      state->domain_dn,
-					      "(&(objectClass=group)(groupType=%u))",
+					      "(&(objectClass=group)(|(groupType=%u)(groupType=%u)))",
+					      GTYPE_SECURITY_UNIVERSAL_GROUP,
 					      GTYPE_SECURITY_GLOBAL_GROUP);
 	info->num_aliases = samdb_search_count(state->sam_ctx, mem_ctx,
 					       state->domain_dn,
-					       "(&(objectClass=group)(groupType=%u))",
+					       "(&(objectClass=group)(|(groupType=%u)(groupType=%u)))",
+					       GTYPE_SECURITY_BUILTIN_LOCAL_GROUP,
 					       GTYPE_SECURITY_DOMAIN_LOCAL_GROUP);
 
 	return NT_STATUS_OK;
@@ -3571,8 +3572,8 @@ static NTSTATUS dcesrv_samr_GetGroupsForUser(struct dcesrv_call_state *dce_call,
 				    attrs, d_state->domain_sid,
 				    "(&(member=%s)(|(grouptype=%d)(grouptype=%d))(objectclass=group))",
 				    ldb_dn_get_linearized(a_state->account_dn),
-				    GTYPE_SECURITY_GLOBAL_GROUP,
-				    GTYPE_SECURITY_UNIVERSAL_GROUP);
+				    GTYPE_SECURITY_UNIVERSAL_GROUP,
+				    GTYPE_SECURITY_GLOBAL_GROUP);
 	if (count < 0)
 		return NT_STATUS_INTERNAL_DB_CORRUPTION;
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list