[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-1172-g1df1892

Volker Lendecke vlendec at samba.org
Tue Aug 25 09:39:01 MDT 2009


The branch, master has been updated
       via  1df18922c613d2d3c8c23b919e435cb1de915eaa (commit)
       via  3176ee2632ddfc6a1fb6f7f3e255cd369c1f0907 (commit)
      from  d896fb2dabaca650130ad6cea59eb3a66879470f (commit)

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


- Log -----------------------------------------------------------------
commit 1df18922c613d2d3c8c23b919e435cb1de915eaa
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 25 17:03:26 2009 +0200

    Add some const to dsgetdcname

commit 3176ee2632ddfc6a1fb6f7f3e255cd369c1f0907
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 25 17:02:53 2009 +0200

    Do an early TALLOC_FREE

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

Summary of changes:
 source3/include/proto.h      |    2 +-
 source3/libads/dns.c         |    3 ++-
 source3/libsmb/dsgetdcname.c |   10 +++++-----
 3 files changed, 8 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index c530ee5..44f6685 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3064,7 +3064,7 @@ void debug_dsdcinfo_flags(int lvl, uint32_t flags);
 NTSTATUS dsgetdcname(TALLOC_CTX *mem_ctx,
 		     struct messaging_context *msg_ctx,
 		     const char *domain_name,
-		     struct GUID *domain_guid,
+		     const struct GUID *domain_guid,
 		     const char *site_name,
 		     uint32_t flags,
 		     struct netr_DsRGetDCNameInfo **info);
diff --git a/source3/libads/dns.c b/source3/libads/dns.c
index 5cf768d..0797eb1 100644
--- a/source3/libads/dns.c
+++ b/source3/libads/dns.c
@@ -985,7 +985,7 @@ NTSTATUS ads_dns_query_dcs_guid(TALLOC_CTX *ctx,
 	/*_ldap._tcp.DomainGuid.domains._msdcs.DnsForestName */
 
 	const char *domains;
-	const char *guid_string;
+	char *guid_string;
 
 	guid_string = GUID_string(ctx, domain_guid);
 	if (!guid_string) {
@@ -997,6 +997,7 @@ NTSTATUS ads_dns_query_dcs_guid(TALLOC_CTX *ctx,
 	if (!domains) {
 		return NT_STATUS_NO_MEMORY;
 	}
+	TALLOC_FREE(guid_string);
 
 	return ads_dns_query_internal(ctx, "_ldap", domains, dns_forest_name,
 				      NULL, dclist, numdcs);
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index 5279b8f..99d21eb 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -314,7 +314,7 @@ static bool check_cldap_reply_required_flags(uint32_t ret_flags,
 
 static NTSTATUS dsgetdcname_cache_fetch(TALLOC_CTX *mem_ctx,
 					const char *domain_name,
-					struct GUID *domain_guid,
+					const struct GUID *domain_guid,
 					uint32_t flags,
 					const char *site_name,
 					struct netr_DsRGetDCNameInfo **info_p)
@@ -381,7 +381,7 @@ static NTSTATUS dsgetdcname_cache_fetch(TALLOC_CTX *mem_ctx,
 static NTSTATUS dsgetdcname_cached(TALLOC_CTX *mem_ctx,
 				   struct messaging_context *msg_ctx,
 				   const char *domain_name,
-				   struct GUID *domain_guid,
+				   const struct GUID *domain_guid,
 				   uint32_t flags,
 				   const char *site_name,
 				   struct netr_DsRGetDCNameInfo **info)
@@ -527,7 +527,7 @@ static NTSTATUS discover_dc_netbios(TALLOC_CTX *mem_ctx,
 
 static NTSTATUS discover_dc_dns(TALLOC_CTX *mem_ctx,
 				const char *domain_name,
-				struct GUID *domain_guid,
+				const struct GUID *domain_guid,
 				uint32_t flags,
 				const char *site_name,
 				struct ip_service_name **returned_dclist,
@@ -1033,7 +1033,7 @@ static NTSTATUS process_dc_netbios(TALLOC_CTX *mem_ctx,
 static NTSTATUS dsgetdcname_rediscover(TALLOC_CTX *mem_ctx,
 				       struct messaging_context *msg_ctx,
 				       const char *domain_name,
-				       struct GUID *domain_guid,
+				       const struct GUID *domain_guid,
 				       uint32_t flags,
 				       const char *site_name,
 				       struct netr_DsRGetDCNameInfo **info)
@@ -1114,7 +1114,7 @@ static bool is_closest_site(struct netr_DsRGetDCNameInfo *info)
 NTSTATUS dsgetdcname(TALLOC_CTX *mem_ctx,
 		     struct messaging_context *msg_ctx,
 		     const char *domain_name,
-		     struct GUID *domain_guid,
+		     const struct GUID *domain_guid,
 		     const char *site_name,
 		     uint32_t flags,
 		     struct netr_DsRGetDCNameInfo **info)


-- 
Samba Shared Repository


More information about the samba-cvs mailing list