[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-2588-gffaed19

Michael Adam obnox at samba.org
Wed Jun 18 13:30:24 GMT 2008


The branch, v3-2-test has been updated
       via  ffaed197d8cb261e2765b2de6cad17cac7d49672 (commit)
      from  679d8dfa390601f777bfb43c02cd921eae5edcf4 (commit)

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


- Log -----------------------------------------------------------------
commit ffaed197d8cb261e2765b2de6cad17cac7d49672
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jun 18 14:50:53 2008 +0200

    Fix Bug #5548 (segfauls in handle_include with %m macro expansion).
    
    In alloc_sub_basic, when expanding '%m', substitute "" instead of
    NULL for remote_machine when this is NULL. Else a NULL string
    is returned.
    
    Michael
    (cherry picked from commit c65b456c6a145d15b7fd27a2a3440a0709fc3277)

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

Summary of changes:
 source/lib/substitute.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/substitute.c b/source/lib/substitute.c
index 62dfdb5..6c74f54 100644
--- a/source/lib/substitute.c
+++ b/source/lib/substitute.c
@@ -648,7 +648,10 @@ char *alloc_sub_basic(const char *smb_name, const char *domain_name,
 			a_string = realloc_string_sub(a_string, "%h", myhostname());
 			break;
 		case 'm' :
-			a_string = realloc_string_sub(a_string, "%m", remote_machine);
+			a_string = realloc_string_sub(a_string, "%m",
+						      remote_machine
+						      ? remote_machine
+						      : "");
 			break;
 		case 'v' :
 			a_string = realloc_string_sub(a_string, "%v", SAMBA_VERSION_STRING);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list