[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Mon May 3 09:26:21 MDT 2010


The branch, master has been updated
       via  a4e35df... s4:LogonGetDomainInfo - fix a potential crash source
       via  e8a001c... s4:LogonGetDomainInfo - fix indentation
       via  8ed5e8a... s4:LogonGetDomainInfo - remove singular "dNSHostName" check - this doesn't belong here
      from  6d1e8c5... build: use the waf patterns for RPATH

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


- Log -----------------------------------------------------------------
commit a4e35df3f5acd959d009f618f7bb00a6f18b4e19
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Mon May 3 17:15:25 2010 +0200

    s4:LogonGetDomainInfo - fix a potential crash source

commit e8a001c51617cc19a2d8fc7d7f86093e6e92952c
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Mon May 3 16:59:53 2010 +0200

    s4:LogonGetDomainInfo - fix indentation

commit 8ed5e8ac9db6e68a1cb0acbd59b89b3f4958341d
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Mon May 3 16:47:03 2010 +0200

    s4:LogonGetDomainInfo - remove singular "dNSHostName" check - this doesn't belong here
    
    I'm not really sure if this check is really done on Windows Server. And if it
    is done, then it's on the LDB level (module).

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

Summary of changes:
 source4/rpc_server/netlogon/dcerpc_netlogon.c |   28 ++++++------------------
 1 files changed, 7 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index b55ad57..3842429 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -1223,11 +1223,10 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
 		"securityIdentifier", "trustPartner", NULL };
 	const char * const attrs2[] = { "dNSHostName",
 		"msDS-SupportedEncryptionTypes", NULL };
-	const char * const attrs3[] = { NULL };
 	const char *temp_str, *temp_str2;
 	const char *old_dns_hostname;
 	struct ldb_context *sam_ctx;
-	struct ldb_message **res0, **res1, **res2, **res3, *new_msg;
+	struct ldb_message **res1, **res2, **res3, *new_msg;
 	struct ldb_dn *workstation_dn;
 	struct netr_DomainInformation *domain_info;
 	struct netr_LsaPolicyInformation *lsa_policy_info;
@@ -1249,8 +1248,8 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
 	NT_STATUS_NOT_OK_RETURN(status);
 
 	sam_ctx = samdb_connect(mem_ctx, dce_call->event_ctx,
-		dce_call->conn->dce_ctx->lp_ctx,
-		system_session(dce_call->conn->dce_ctx->lp_ctx));
+				dce_call->conn->dce_ctx->lp_ctx,
+				system_session(dce_call->conn->dce_ctx->lp_ctx));
 	if (sam_ctx == NULL) {
 		return NT_STATUS_INVALID_SYSTEM_SERVICE;
 	}
@@ -1258,6 +1257,10 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
 	switch (r->in.level) {
 	case 1: /* Domain information */
 
+		if (r->in.query->workstation_info == NULL) {
+			return NT_STATUS_INVALID_PARAMETER;
+		}
+
 		/*
 		 * Updates the DNS hostname when the client wishes that the
 		 * server should handle this for him
@@ -1286,23 +1289,6 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
 			update_dns_hostname = false;
 		}
 
-		/*
-		 * Check that the DNS hostname when it should be updated
-		 * will be used only by maximum one host.
-		 */
-		ret = gendb_search(sam_ctx, mem_ctx,
-				   ldb_get_default_basedn(sam_ctx),
-				   &res0, attrs3, "(dNSHostName=%s)",
-				   r->in.query->workstation_info->dns_hostname);
-		if (ret < 0) {
-			return NT_STATUS_INTERNAL_DB_CORRUPTION;
-		}
-		if (ret >= 1) {
-			update_dns_hostname = false;
-		}
-
-		talloc_free(res0);
-
 		/* Prepare the workstation DN */
 		workstation_dn = ldb_dn_new_fmt(mem_ctx, sam_ctx, "<SID=%s>",
 			dom_sid_string(mem_ctx, creds->sid));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list