[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-242-gab89348

Jeremy Allison jra at samba.org
Fri Nov 9 01:59:36 GMT 2007


The branch, v3-2-test has been updated
       via  ab8934844a8ae08657769ce1787c32f14a7eb745 (commit)
      from  2a0173743d2cf615d52278f3dd87cc804abe2d16 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit ab8934844a8ae08657769ce1787c32f14a7eb745
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Nov 8 17:58:55 2007 -0800

    Fix case where we have no dns domain name. Return a talloc of "".
    Jeremy.

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

Summary of changes:
 source/lib/util.c              |    2 ++
 source/printing/nt_printing.c  |    2 +-
 source/rpc_server/srv_lsa_nt.c |    2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/util.c b/source/lib/util.c
index 6e92a60..287d209 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -1227,6 +1227,8 @@ char *get_mydnsdomname(TALLOC_CTX *ctx)
 	if (p) {
 		p++;
 		my_domname = talloc_strdup(ctx, p);
+	} else {
+		my_domname = talloc_strdup(ctx, "");
 	}
 
 	return my_domname;
diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c
index 57e7d37..e729c3b 100644
--- a/source/printing/nt_printing.c
+++ b/source/printing/nt_printing.c
@@ -2953,7 +2953,7 @@ static bool map_nt_printer_info2_to_dsspooler(NT_PRINTER_INFO_LEVEL_2 *info2)
 	   join the domain */
 
 	dnssuffix = get_mydnsdomname(talloc_tos());
-	if (!dnssuffix) {
+	if (dnssuffix && *dnssuffix) {
 		fstr_sprintf( longname, "%s.%s", global_myname(), dnssuffix );
 	} else {
 		fstrcpy( longname, global_myname() );
diff --git a/source/rpc_server/srv_lsa_nt.c b/source/rpc_server/srv_lsa_nt.c
index 5c2e1b6..2065508 100644
--- a/source/rpc_server/srv_lsa_nt.c
+++ b/source/rpc_server/srv_lsa_nt.c
@@ -1928,7 +1928,7 @@ NTSTATUS _lsa_query_info2(pipes_struct *p, LSA_Q_QUERY_INFO2 *q_u, LSA_R_QUERY_I
 
 				/* This should be a 'netbios domain -> DNS domain' mapping */
 				dnsdomname = get_mydnsdomname(p->mem_ctx);
-				if (!dnsdomname) {
+				if (!dnsdomname || !*dnsdomname) {
 					return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
 				}
 				strlower_m(dnsdomname);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list