[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Wed Jun 16 04:09:40 MDT 2010


The branch, master has been updated
       via  47ae4a5... s3-spoolss: Provide a memory context for clean_up_driver_struct().
      from  18f3e51... s4:dsdb Allow renames with (now removed) linked attributes

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


- Log -----------------------------------------------------------------
commit 47ae4a518c5eb7c02d3f6c65f64d2ac490a90e83
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jun 16 11:44:36 2010 +0200

    s3-spoolss: Provide a memory context for clean_up_driver_struct().
    
    If we use a stack variable to setup spoolss_AddDriverInfoCtr this would
    segfault with a talloc bad magic value.

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

Summary of changes:
 source3/include/proto.h             |    3 ++-
 source3/printing/nt_printing.c      |    7 ++++---
 source3/rpc_server/srv_spoolss_nt.c |    2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index cd8d942..31a1d45 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -4750,7 +4750,8 @@ bool delete_a_form(nt_forms_struct **list, const char *del_name, int *count, WER
 void update_a_form(nt_forms_struct **list, struct spoolss_AddFormInfo1 *form, int count);
 int get_ntdrivers(fstring **list, const char *architecture, uint32 version);
 const char *get_short_archi(const char *long_archi);
-WERROR clean_up_driver_struct(struct pipes_struct *rpc_pipe,
+WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx,
+			      struct pipes_struct *rpc_pipe,
 			      struct spoolss_AddDriverInfoCtr *r);
 WERROR move_driver_to_download_area(struct pipes_struct *p,
 				    struct spoolss_AddDriverInfoCtr *r,
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index c87cfc1..434311d 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1676,12 +1676,13 @@ static WERROR clean_up_driver_struct_level(TALLOC_CTX *mem_ctx,
 /****************************************************************************
 ****************************************************************************/
 
-WERROR clean_up_driver_struct(struct pipes_struct *rpc_pipe,
+WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx,
+			      struct pipes_struct *rpc_pipe,
 			      struct spoolss_AddDriverInfoCtr *r)
 {
 	switch (r->level) {
 	case 3:
-		return clean_up_driver_struct_level(r, rpc_pipe,
+		return clean_up_driver_struct_level(mem_ctx, rpc_pipe,
 						    r->info.info3->architecture,
 						    &r->info.info3->driver_path,
 						    &r->info.info3->data_file,
@@ -1690,7 +1691,7 @@ WERROR clean_up_driver_struct(struct pipes_struct *rpc_pipe,
 						    r->info.info3->dependent_files,
 						    &r->info.info3->version);
 	case 6:
-		return clean_up_driver_struct_level(r, rpc_pipe,
+		return clean_up_driver_struct_level(mem_ctx, rpc_pipe,
 						    r->info.info6->architecture,
 						    &r->info.info6->driver_path,
 						    &r->info.info6->data_file,
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index e03bb34..6fd3695 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -7377,7 +7377,7 @@ WERROR _spoolss_AddPrinterDriverEx(pipes_struct *p,
 	}
 
 	DEBUG(5,("Cleaning driver's information\n"));
-	err = clean_up_driver_struct(p, r->in.info_ctr);
+	err = clean_up_driver_struct(p->mem_ctx, p, r->in.info_ctr);
 	if (!W_ERROR_IS_OK(err))
 		goto done;
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list