[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1403-g4db26c8

Volker Lendecke vl at samba.org
Wed Jan 16 10:36:03 GMT 2008


The branch, v3-2-test has been updated
       via  4db26c803de52d3efccc940efc55f14131a057f5 (commit)
      from  dea64a0d886919dfd5bcc550cb36deabe4ec010d (commit)

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


- Log -----------------------------------------------------------------
commit 4db26c803de52d3efccc940efc55f14131a057f5
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jan 16 11:39:20 2008 +0100

    Fix a crash bug in nt_printer_publish_ads
    
    Reported by Martin Zielinski <mz at seh.de>

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

Summary of changes:
 source/printing/nt_printing.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c
index bba55c0..d5803b7 100644
--- a/source/printing/nt_printing.c
+++ b/source/printing/nt_printing.c
@@ -3315,8 +3315,13 @@ static WERROR nt_printer_publish_ads(ADS_STRUCT *ads,
 
 	/* publish it */
 	ads_rc = ads_mod_printer_entry(ads, prt_dn, ctx, &mods);
-	if (ads_rc.err.rc == LDAP_NO_SUCH_OBJECT)
+	if (ads_rc.err.rc == LDAP_NO_SUCH_OBJECT) {
+		int i;
+		for (i=0; mods[i] != 0; i++)
+			;
+		mods[i] = (LDAPMod *)-1;
 		ads_rc = ads_add_printer_entry(ads, prt_dn, ctx, &mods);
+	}
 
 	if (!ADS_ERR_OK(ads_rc))
 		DEBUG(3, ("error publishing %s: %s\n", printer->info_2->sharename, ads_errstr(ads_rc)));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list