The branch, master has been updated
       via  1f0be3e s4:torture: Do not segfault in 
torture_rpc_spoolss_printer_teardown_common()
      from  7f1ff6b samba_kcc: debugging: say intrasite when we mean intrasite

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


- Log -----------------------------------------------------------------
commit 1f0be3e1199170b599652905021a57e966ef12a9
Author: Andreas Schneider <[email protected]>
Date:   Thu Jun 22 10:25:09 2017 +0200

    s4:torture: Do not segfault in torture_rpc_spoolss_printer_teardown_common()
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Guenther Deschner <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>
    
    Autobuild-User(master): Andreas Schneider <[email protected]>
    Autobuild-Date(master): Fri Jun 23 21:00:19 CEST 2017 on sn-devel-144

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

Summary of changes:
 source4/torture/rpc/spoolss.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 20d2f14..14a43b9 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -8572,10 +8572,14 @@ static bool 
torture_rpc_spoolss_printer_teardown_common(struct torture_context *
 {
        bool found = false;
        struct dcerpc_pipe *p = t->spoolss_pipe;
-       struct dcerpc_binding_handle *b = p->binding_handle;
-       const char *printer_name = t->info2.printername;
+       struct dcerpc_binding_handle *b = NULL;
        const char *server_name_slash;
 
+       if (p == NULL) {
+               return true;
+       }
+       b = p->binding_handle;
+
        server_name_slash = talloc_asprintf(tctx, "\\\\%s", 
dcerpc_server_name(p));
 
        if (t->added_driver) {
@@ -8594,7 +8598,8 @@ static bool 
torture_rpc_spoolss_printer_teardown_common(struct torture_context *
                        "failed to delete printer driver via spoolss");
        }
 
-       if (p && !t->wellknown) {
+       if (!t->wellknown) {
+               const char *printer_name = t->info2.printername;
 
                torture_assert(tctx,
                        test_DeletePrinter(tctx, b, &t->handle),


-- 
Samba Shared Repository

Reply via email to