[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Fri May 5 17:48:02 UTC 2017


The branch, master has been updated
       via  825d00d s4: torture: Remove the last talloc_autofree_context() from source4/torture/*.c
       via  911fdd8 s4: torture: Remove talloc_autofree_context() from gentest.
       via  45fbddd s4: torture: Remove talloc_autofree_context() from locktest.
       via  fa88c5d s4: torture: Use a named TALLOC_CTX in masktest instead of talloc_autofree_context().
       via  47d7463 s4: torture: Add a TALLOC_CTX * to torture_smb2_getinfo_init().
       via  0a301e8 s4: torture: Add a TALLOC_CTX * to torture_test_delete().
       via  3400451 s4: torture: Add a TALLOC_CTX * to torture_winbind_struct_init().
       via  aff8277 s4: torture: Add a TALLOC_CTX * to torture_vfs_fruit(), torture_vfs_fruit_netatalk(), torture_vfs_fruit_file_id()
       via  5084bab s4: torture: Add a TALLOC_CTX * to torture_acl_xattr().
       via  67557dc s4: torture: Add a TALLOC_CTX * to torture_smb2_streams_init().
       via  097ffa7 s4: torture: Add a TALLOC_CTX * to torture_smb2_session_init().
       via  6c45ca7 s4: torture: Add a TALLOC_CTX * to torture_smb2_scan_init().
       via  a0552b1 s4: torture: Add a TALLOC_CTX * to torture_smb2_replay_init().
       via  af7ce00 s4: torture: Add a TALLOC_CTX * to torture_smb2_rename_init().
       via  c08d43c s4: torture: Add a TALLOC_CTX * to torture_smb2_read_init().
       via  6c5f377 s4: torture: Add a TALLOC_CTX * to torture_smb2_oplocks_init(), torture_smb2_kernel_oplocks_init().
       via  b0613ed s4: torture: Add a TALLOC_CTX * to torture_smb2_notify_disabled_init().
       via  123973e s4: torture: Add a TALLOC_CTX * to torture_smb2_notify_init().
       via  2480351 s4: torture: Add a TALLOC_CTX * to torture_smb2_lock_init().
       via  1132d57 s4: torture: Add a TALLOC_CTX * to torture_smb2_lease_init().
       via  6264d21 s4: tortute: Add a TALLOC_CTX * to torture_smb2_ioctl_init().
       via  3f5ad6f s4: torture: Add TALLOC_CTX * to torture_smb2_durable_v2_open_init().
       via  b8a616e s4: torture: Add TALLOC_CTX * to torture_smb2_durable_open_disconnect_init(), torture_smb2_durable_open_init()
       via  44a1dc3 s4: torture: Add a TALLOC_CTX * to torture_smb2_dir_init().
       via  9aa023a s4: torture: Add a TALLOC_CTX * to torture_smb2_doc_init().
       via  b871d5f s4: torture: Add a TALLOC_CTX * to torture_smb2_crediting_init().
       via  a039a46 s4: torture: Add a TALLOC_CTX * to torture_smb2_create_init().
       via  6e29f07 s4: torture: Add TALLOC_CTX * to torture_smb2_compound_find_init() and torture_smb2_compound_init().
       via  33320f5 s4: torture: Add TALLOC_CTX * to torture_smb2_acls_init().
       via  6a53ce5 s4: torture: Add TALLOC_CTX * to torture_winbind_init().
       via  c99994e s4: torture: Pass TALLOC_CTX * to torture_delay_write().
       via  e7e56bc s4: torture: Change torture_register_suite() to add a TALLOC_CTX *.
       via  1d66673 s4: torture: Pass the new talloc context into torture_init().
       via  6341d3d s4: torture: Add a TALLOC_CTX * to torture_parse_target().
       via  f18cc16 s4: torture: Create a top level talloc contxt.
      from  e11ee75 samba-tool: Rename Samba4 to Samba AD

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


- Log -----------------------------------------------------------------
commit 825d00df19f32845a66b080354824fada946d620
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 16:40:37 2017 -0700

    s4: torture: Remove the last talloc_autofree_context() from source4/torture/*.c
    
    Allocate the saved packets off the NULL context instead, and
    use a new function free_received_packets() to clear out the
    received_packets list.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri May  5 19:47:50 CEST 2017 on sn-devel-144

commit 911fdd8ca0a0a1ba6748ff00a3327073a0611bda
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 16:20:28 2017 -0700

    s4: torture: Remove talloc_autofree_context() from gentest.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 45fbddda9c6ce98679a2e8685bad19795c0a8b49
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 16:18:16 2017 -0700

    s4: torture: Remove talloc_autofree_context() from locktest.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit fa88c5da46d5da23b1221c2cefa989901c63f141
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 16:11:22 2017 -0700

    s4: torture: Use a named TALLOC_CTX in masktest instead of talloc_autofree_context().
    
    Move all talloc_free()'s back to main from the function call.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 47d74639d99fa51f5a43d82f1b2f693a5c38f226
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 16:04:10 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_getinfo_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 0a301e82d763603a1caf77909b9fe2e35c0a6975
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 16:02:46 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_test_delete().
    
    Reviewed-by: Ralph Böhme <slow at samba.org>
    Signed-off-by: Jeremy Allison <jra at samba.org>

commit 3400451fea9ceb1d1c5a6a681e23cae241f6c50e
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:50:37 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_winbind_struct_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit aff82778170739082958ce717681c79e5ef7b5ab
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:48:42 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_vfs_fruit(), torture_vfs_fruit_netatalk(), torture_vfs_fruit_file_id()
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 5084babf2d8c6813b0b4a4e2c69365d98a27b483
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:46:47 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_acl_xattr().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 67557dceeb577a7c5625afe245d5d2421a20c802
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:45:02 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_streams_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 097ffa789b900b50386955799eee705c215203bd
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:43:27 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_session_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 6c45ca7ce573d0b37665e9ea422aa711f5281bdf
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:42:20 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_scan_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit a0552b18a77cf5ab61621f284d2d928d5f8b7c94
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:41:18 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_replay_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit af7ce00ff1e57ff55f5b0707ab12be834189fb11
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:40:16 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_rename_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit c08d43c699546f3805f1e53fe1ce00dc7374bfb2
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:38:38 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_read_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 6c5f37733cd12c33f7ddb409c3ea0ddc9f3877d0
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:37:12 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_oplocks_init(), torture_smb2_kernel_oplocks_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit b0613ed15fb6d51bf9cfb8e2fe72f5ba91a85989
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:35:18 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_notify_disabled_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 123973e684cda747d8ab68c52d31196af77f769d
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:33:53 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_notify_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 248035114b51a9b1d26282736b0ceea90319442f
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:32:26 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_lock_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 1132d57aeda94262676895fab0e1e9c99c39fca5
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:31:25 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_lease_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 6264d214010ce9ebee153b2b87347b5891fd535f
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:30:14 2017 -0700

    s4: tortute: Add a TALLOC_CTX * to torture_smb2_ioctl_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 3f5ad6f01486e88bbf06cbd961cacbb728cfa5d0
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:27:01 2017 -0700

    s4: torture: Add TALLOC_CTX * to torture_smb2_durable_v2_open_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit b8a616ef3de2d43f8daae51939a451fd2abbf2d3
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:25:38 2017 -0700

    s4: torture: Add TALLOC_CTX * to torture_smb2_durable_open_disconnect_init(), torture_smb2_durable_open_init()
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 44a1dc363433517f83fb04427ebba6db4f9f9e4d
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:22:37 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_dir_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 9aa023a1887db79b492c55b1c82a4e02350a5e0b
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:20:58 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_doc_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit b871d5fdaeced5d8f779f5b832e7f8f8579cdbd7
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:19:12 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_crediting_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit a039a4634f7aabee220d6023c49a5c2024d954a4
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:17:45 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_smb2_create_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 6e29f073b49c5da3ba0955a36110248651de961a
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:13:10 2017 -0700

    s4: torture: Add TALLOC_CTX * to torture_smb2_compound_find_init() and torture_smb2_compound_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 33320f580397f4ad040323d9d40a92c362dcd373
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:11:19 2017 -0700

    s4: torture: Add TALLOC_CTX * to torture_smb2_acls_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 6a53ce5dd77075ebbbcca5b7558563cd6c87aa9f
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:09:36 2017 -0700

    s4: torture: Add TALLOC_CTX * to torture_winbind_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit c99994eb5a01d882ada9e581c2824facf103b7b7
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 15:07:49 2017 -0700

    s4: torture: Pass TALLOC_CTX * to torture_delay_write().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit e7e56bcc72cb4e4372f03a66e62bebb3005c633b
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 14:41:26 2017 -0700

    s4: torture: Change torture_register_suite() to add a TALLOC_CTX *.
    
    Change callers to use the passed in TALLOC_CTX *
    instead of talloc_autofree_context().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 1d6667381cfe568be2a0731225a6fed332343dc8
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 14:27:36 2017 -0700

    s4: torture: Pass the new talloc context into torture_init().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit 6341d3d59f2cee3478e02eb0a6f6c96f31bda513
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 16:00:17 2017 -0700

    s4: torture: Add a TALLOC_CTX * to torture_parse_target().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

commit f18cc16cf1c5dc089e038cd894ee42890e377d48
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 24 14:24:15 2017 -0700

    s4: torture: Create a top level talloc contxt.
    
    Use it to replace some talloc_autofree_contexts.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Böhme <slow at samba.org>

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

Summary of changes:
 libcli/echo/tests/echo.c                    |  4 +--
 nsswitch/libwbclient/tests/wbclient.c       |  4 +--
 source4/torture/basic/base.c                |  8 ++---
 source4/torture/basic/delaywrite.c          |  4 +--
 source4/torture/basic/delete.c              |  4 +--
 source4/torture/dfs/domaindfs.c             |  4 +--
 source4/torture/dns/dlz_bind9.c             |  5 ++-
 source4/torture/dns/internal_dns.c          |  5 ++-
 source4/torture/drs/drs_init.c              |  9 +++--
 source4/torture/gentest.c                   | 19 ++++++++--
 source4/torture/krb5/kdc-heimdal.c          |  4 +--
 source4/torture/krb5/kdc-mit.c              |  4 +--
 source4/torture/ldap/common.c               |  4 +--
 source4/torture/libnet/libnet.c             |  4 +--
 source4/torture/libnetapi/libnetapi.c       |  4 +--
 source4/torture/libsmbclient/libsmbclient.c |  4 +--
 source4/torture/local/local.c               |  6 ++--
 source4/torture/locktest.c                  | 19 +++++++---
 source4/torture/masktest.c                  | 13 ++++---
 source4/torture/nbench/nbench.c             |  4 +--
 source4/torture/nbt/nbt.c                   |  4 +--
 source4/torture/ntp/ntp_signd.c             |  4 +--
 source4/torture/rap/rap.c                   |  4 +--
 source4/torture/raw/raw.c                   |  4 +--
 source4/torture/rpc/rpc.c                   |  4 +--
 source4/torture/rpc/spoolss_notify.c        | 21 +++++++++--
 source4/torture/shell.c                     |  2 +-
 source4/torture/smb2/acls.c                 |  4 +--
 source4/torture/smb2/compound.c             |  8 ++---
 source4/torture/smb2/create.c               |  4 +--
 source4/torture/smb2/credits.c              |  4 +--
 source4/torture/smb2/delete-on-close.c      |  4 +--
 source4/torture/smb2/dir.c                  |  4 +--
 source4/torture/smb2/durable_open.c         |  8 ++---
 source4/torture/smb2/durable_v2_open.c      |  4 +--
 source4/torture/smb2/getinfo.c              |  4 +--
 source4/torture/smb2/ioctl.c                |  4 +--
 source4/torture/smb2/lease.c                |  4 +--
 source4/torture/smb2/lock.c                 |  4 +--
 source4/torture/smb2/notify.c               |  4 +--
 source4/torture/smb2/notify_disabled.c      |  5 +--
 source4/torture/smb2/oplock.c               |  8 ++---
 source4/torture/smb2/read.c                 |  4 +--
 source4/torture/smb2/rename.c               |  4 +--
 source4/torture/smb2/replay.c               |  4 +--
 source4/torture/smb2/scan.c                 |  4 +--
 source4/torture/smb2/session.c              |  4 +--
 source4/torture/smb2/smb2.c                 | 55 +++++++++++++++--------------
 source4/torture/smb2/streams.c              |  4 +--
 source4/torture/smbtorture.c                | 50 ++++++++++++++++++++------
 source4/torture/smbtorture.h                |  8 +++--
 source4/torture/torture.c                   | 12 +++----
 source4/torture/unix/unix.c                 |  4 +--
 source4/torture/vfs/acl_xattr.c             |  4 +--
 source4/torture/vfs/fruit.c                 | 12 +++----
 source4/torture/vfs/vfs.c                   | 12 +++----
 source4/torture/winbind/struct_based.c      |  4 +--
 source4/torture/winbind/winbind.c           | 10 +++---
 58 files changed, 259 insertions(+), 184 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/echo/tests/echo.c b/libcli/echo/tests/echo.c
index 8e51504..e465b99 100644
--- a/libcli/echo/tests/echo.c
+++ b/libcli/echo/tests/echo.c
@@ -85,13 +85,13 @@ NTSTATUS torture_libcli_echo_init(TALLOC_CTX *ctx)
 {
 	struct torture_suite *suite;
 
-	suite = torture_suite_create(talloc_autofree_context(), "echo");
+	suite = torture_suite_create(ctx, "echo");
 	NT_STATUS_HAVE_NO_MEMORY(suite);
 
 	torture_suite_add_simple_test(suite, "udp", torture_echo_udp);
 
 	suite->description = talloc_strdup(suite, "libcli/echo interface tests");
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	return NT_STATUS_OK;
 }
diff --git a/nsswitch/libwbclient/tests/wbclient.c b/nsswitch/libwbclient/tests/wbclient.c
index b3c93a1..c5428af 100644
--- a/nsswitch/libwbclient/tests/wbclient.c
+++ b/nsswitch/libwbclient/tests/wbclient.c
@@ -925,9 +925,9 @@ static bool test_wbc_getgroups(struct torture_context *tctx)
 	return true;
 }
 
-struct torture_suite *torture_wbclient(void)
+struct torture_suite *torture_wbclient(TALLOC_CTX *ctx)
 {
-	struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "wbclient");
+	struct torture_suite *suite = torture_suite_create(ctx, "wbclient");
 
 	torture_suite_add_simple_test(suite, "wbcPing", test_wbc_ping);
 	torture_suite_add_simple_test(suite, "wbcPingDc", test_wbc_pingdc);
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index f5ee966..8e7ae49 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -1937,7 +1937,7 @@ static bool run_birthtimetest(struct torture_context *tctx,
 
 NTSTATUS torture_base_init(TALLOC_CTX *ctx)
 {
-	struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "base");
+	struct torture_suite *suite = torture_suite_create(ctx, "base");
 
 	torture_suite_add_2smb_test(suite, "fdpass", run_fdpasstest);
 	torture_suite_add_suite(suite, torture_base_locktest(suite));
@@ -1963,7 +1963,7 @@ NTSTATUS torture_base_init(TALLOC_CTX *ctx)
 	torture_suite_add_1smb_test(suite, "xcopy", run_xcopy);
 	torture_suite_add_1smb_test(suite, "iometer", run_iometer);
 	torture_suite_add_1smb_test(suite, "rename", torture_test_rename);
-	torture_suite_add_suite(suite, torture_test_delete());
+	torture_suite_add_suite(suite, torture_test_delete(suite));
 	torture_suite_add_1smb_test(suite, "properties", torture_test_properties);
 	torture_suite_add_1smb_test(suite, "mangle", torture_mangle);
 	torture_suite_add_1smb_test(suite, "openattr", torture_openattrtest);
@@ -1972,7 +1972,7 @@ NTSTATUS torture_base_init(TALLOC_CTX *ctx)
 	torture_suite_add_1smb_test(suite, "chkpath",  torture_chkpath_test);
 	torture_suite_add_1smb_test(suite, "secleak",  torture_sec_leak);
 	torture_suite_add_simple_test(suite, "disconnect",  torture_disconnect);
-	torture_suite_add_suite(suite, torture_delay_write());
+	torture_suite_add_suite(suite, torture_delay_write(suite));
 	torture_suite_add_simple_test(suite, "samba3error", torture_samba3_errorpaths);
 	torture_suite_add_1smb_test(suite, "casetable", torture_casetable);
 	torture_suite_add_1smb_test(suite, "utable", torture_utable);
@@ -1996,7 +1996,7 @@ NTSTATUS torture_base_init(TALLOC_CTX *ctx)
 	suite->description = talloc_strdup(suite, 
 					"Basic SMB tests (imported from the original smbtorture)");
 
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	return NT_STATUS_OK;
 }
diff --git a/source4/torture/basic/delaywrite.c b/source4/torture/basic/delaywrite.c
index 67788f4..45a5f4e 100644
--- a/source4/torture/basic/delaywrite.c
+++ b/source4/torture/basic/delaywrite.c
@@ -3068,9 +3068,9 @@ static bool test_directory_update8(struct torture_context *tctx, struct smbcli_s
 /*
    testing of delayed update of write_time
 */
-struct torture_suite *torture_delay_write(void)
+struct torture_suite *torture_delay_write(TALLOC_CTX *ctx)
 {
-	struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "delaywrite");
+	struct torture_suite *suite = torture_suite_create(ctx, "delaywrite");
 
 	torture_suite_add_2smb_test(suite, "finfo update on close", test_finfo_after_write);
 	torture_suite_add_1smb_test(suite, "delayed update of write time", test_delayed_write_update);
diff --git a/source4/torture/basic/delete.c b/source4/torture/basic/delete.c
index 76a83df..21af05c 100644
--- a/source4/torture/basic/delete.c
+++ b/source4/torture/basic/delete.c
@@ -2204,10 +2204,10 @@ static bool deltest23(struct torture_context *tctx,
 /*
   Test delete on close semantics.
  */
-struct torture_suite *torture_test_delete(void)
+struct torture_suite *torture_test_delete(TALLOC_CTX *ctx)
 {
 	struct torture_suite *suite = torture_suite_create(
-		talloc_autofree_context(), "delete");
+		ctx, "delete");
 
 	torture_suite_add_2smb_test(suite, "deltest1", deltest1);
 	torture_suite_add_2smb_test(suite, "deltest2", deltest2);
diff --git a/source4/torture/dfs/domaindfs.c b/source4/torture/dfs/domaindfs.c
index 82e6843..4bc5192 100644
--- a/source4/torture/dfs/domaindfs.c
+++ b/source4/torture/dfs/domaindfs.c
@@ -503,7 +503,7 @@ static bool test_low_referral_level(struct torture_context *tctx,
 
 NTSTATUS torture_dfs_init(TALLOC_CTX *ctx)
 {
-	struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "dfs");
+	struct torture_suite *suite = torture_suite_create(ctx, "dfs");
 	struct torture_suite *suite_basic = torture_suite_create(suite, "domain");
 
 	torture_suite_add_suite(suite, suite_basic);
@@ -534,7 +534,7 @@ NTSTATUS torture_dfs_init(TALLOC_CTX *ctx)
 
 	suite->description = talloc_strdup(suite, "DFS referrals calls");
 
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	return NT_STATUS_OK;
 }
diff --git a/source4/torture/dns/dlz_bind9.c b/source4/torture/dns/dlz_bind9.c
index 7a01ec0..f16d16e 100644
--- a/source4/torture/dns/dlz_bind9.c
+++ b/source4/torture/dns/dlz_bind9.c
@@ -1084,12 +1084,11 @@ NTSTATUS torture_bind_dns_init(TALLOC_CTX *);
 NTSTATUS torture_bind_dns_init(TALLOC_CTX *ctx)
 {
 	struct torture_suite *suite;
-	TALLOC_CTX *mem_ctx = talloc_autofree_context();
 
 	/* register DNS related test cases */
-	suite = dlz_bind9_suite(mem_ctx);
+	suite = dlz_bind9_suite(ctx);
 	if (!suite) return NT_STATUS_NO_MEMORY;
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	return NT_STATUS_OK;
 }
diff --git a/source4/torture/dns/internal_dns.c b/source4/torture/dns/internal_dns.c
index ac234e1..2ccc7ed 100644
--- a/source4/torture/dns/internal_dns.c
+++ b/source4/torture/dns/internal_dns.c
@@ -179,12 +179,11 @@ NTSTATUS torture_internal_dns_init(TALLOC_CTX *);
 NTSTATUS torture_internal_dns_init(TALLOC_CTX *ctx)
 {
 	struct torture_suite *suite;
-	TALLOC_CTX *mem_ctx = talloc_autofree_context();
 
 	/* register internal DNS torture test cases */
-	suite = internal_dns_suite(mem_ctx);
+	suite = internal_dns_suite(ctx);
 	if (!suite) return NT_STATUS_NO_MEMORY;
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	return NT_STATUS_OK;
 }
diff --git a/source4/torture/drs/drs_init.c b/source4/torture/drs/drs_init.c
index 2dcb6f1..bbe246d 100644
--- a/source4/torture/drs/drs_init.c
+++ b/source4/torture/drs/drs_init.c
@@ -65,17 +65,16 @@ static struct torture_suite * torture_drs_unit_suite(TALLOC_CTX *mem_ctx,
 NTSTATUS torture_drs_init(TALLOC_CTX *ctx)
 {
 	struct torture_suite *suite;
-	TALLOC_CTX *mem_ctx = talloc_autofree_context();
 
 	/* register RPC related test cases */
-	suite = torture_drs_rpc_suite(mem_ctx, "drs.rpc");
+	suite = torture_drs_rpc_suite(ctx, "drs.rpc");
 	if (!suite) return NT_STATUS_NO_MEMORY;
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	/* register DRS Unit test cases */
-	suite = torture_drs_unit_suite(mem_ctx, "drs.unit");
+	suite = torture_drs_unit_suite(ctx, "drs.unit");
 	if (!suite) return NT_STATUS_NO_MEMORY;
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	return NT_STATUS_OK;
 }
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index 4cd2258..33de6cc 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -3199,6 +3199,7 @@ int main(int argc, const char *argv[])
 		POPT_COMMON_VERSION
 		{ NULL }
 	};
+	TALLOC_CTX *mem_ctx = NULL;
 
 	memset(&bad_smb2_handle, 0xFF, sizeof(bad_smb2_handle));
 
@@ -3208,14 +3209,20 @@ int main(int argc, const char *argv[])
 	options.max_open_handles = 20;
 	options.seeds_file = "gentest_seeds.dat";
 
+	mem_ctx = talloc_named_const(NULL, 0, "gentest_ctx");
+	if (mem_ctx == NULL) {
+		printf("Unable to allocate gentest_ctx\n");
+		exit(1);
+	}
+
 	pc = poptGetContext("gentest", argc, argv, long_options,
 			    POPT_CONTEXT_KEEP_FIRST);
 
 	poptSetOtherOptionHelp(pc, "<unc1> <unc2>");
 
 	lp_ctx = cmdline_lp_ctx;
-	servers[0].credentials = cli_credentials_init(talloc_autofree_context());
-	servers[1].credentials = cli_credentials_init(talloc_autofree_context());
+	servers[0].credentials = cli_credentials_init(mem_ctx);
+	servers[1].credentials = cli_credentials_init(mem_ctx);
 	cli_credentials_guess(servers[0].credentials, lp_ctx);
 	cli_credentials_guess(servers[1].credentials, lp_ctx);
 
@@ -3227,6 +3234,7 @@ int main(int argc, const char *argv[])
 		case 'U':
 			if (username_count == 2) {
 				usage(pc);
+				talloc_free(mem_ctx);
 				exit(1);
 			}
 			cli_credentials_parse_string(servers[username_count].credentials, poptGetOptArg(pc), CRED_SPECIFIED);
@@ -3250,6 +3258,7 @@ int main(int argc, const char *argv[])
 
 	if (!(argc_new >= 3)) {
 		usage(pc);
+		talloc_free(mem_ctx);
 		exit(1);
 	}
 
@@ -3259,6 +3268,7 @@ int main(int argc, const char *argv[])
 
 	if (argc < 3 || argv[1][0] == '-') {
 		usage(pc);
+		talloc_free(mem_ctx);
 		exit(1);
 	}
 
@@ -3268,12 +3278,14 @@ int main(int argc, const char *argv[])
 		const char *share = argv[1+i];
 		if (!split_unc_name(share, &servers[i].server_name, &servers[i].share_name)) {
 			printf("Invalid share name '%s'\n", share);
+			talloc_free(mem_ctx);
 			return -1;
 		}
 	}
 
 	if (username_count == 0) {
 		usage(pc);
+		talloc_free(mem_ctx);
 		return -1;
 	}
 	if (username_count == 1) {
@@ -3282,7 +3294,7 @@ int main(int argc, const char *argv[])
 
 	printf("seed=%u\n", options.seed);
 
-	ev = s4_event_context_init(talloc_autofree_context());
+	ev = s4_event_context_init(mem_ctx);
 
 	gensec_init();
 
@@ -3294,5 +3306,6 @@ int main(int argc, const char *argv[])
 		printf("gentest failed\n");
 	}
 
+	talloc_free(mem_ctx);
 	return ret?0:-1;
 }
diff --git a/source4/torture/krb5/kdc-heimdal.c b/source4/torture/krb5/kdc-heimdal.c
index b6c8117..2cf972c 100644
--- a/source4/torture/krb5/kdc-heimdal.c
+++ b/source4/torture/krb5/kdc-heimdal.c
@@ -687,7 +687,7 @@ static bool torture_krb5_as_req_aes_rc4(struct torture_context *tctx)
 
 NTSTATUS torture_krb5_init(TALLOC_CTX *ctx)
 {
-	struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "krb5");
+	struct torture_suite *suite = torture_suite_create(ctx, "krb5");
 	struct torture_suite *kdc_suite = torture_suite_create(suite, "kdc");
 	suite->description = talloc_strdup(suite, "Kerberos tests");
 	kdc_suite->description = talloc_strdup(kdc_suite, "Kerberos KDC tests");
@@ -719,6 +719,6 @@ NTSTATUS torture_krb5_init(TALLOC_CTX *ctx)
 	torture_suite_add_suite(kdc_suite, torture_krb5_canon(kdc_suite));
 	torture_suite_add_suite(suite, kdc_suite);
 
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 	return NT_STATUS_OK;
 }
diff --git a/source4/torture/krb5/kdc-mit.c b/source4/torture/krb5/kdc-mit.c
index 29cb93d..77fa8c3 100644
--- a/source4/torture/krb5/kdc-mit.c
+++ b/source4/torture/krb5/kdc-mit.c
@@ -749,7 +749,7 @@ static bool torture_krb5_as_req_aes_rc4(struct torture_context *tctx)
 NTSTATUS torture_krb5_init(TALLOC_CTX *ctx)
 {
 	struct torture_suite *suite =
-		torture_suite_create(talloc_autofree_context(), "krb5");
+		torture_suite_create(ctx, "krb5");
 	struct torture_suite *kdc_suite = torture_suite_create(suite, "kdc");
 	suite->description = talloc_strdup(suite, "Kerberos tests");
 	kdc_suite->description = talloc_strdup(kdc_suite, "Kerberos KDC tests");
@@ -788,7 +788,7 @@ NTSTATUS torture_krb5_init(TALLOC_CTX *ctx)
 
 	torture_suite_add_suite(suite, kdc_suite);
 
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	return NT_STATUS_OK;
 }
diff --git a/source4/torture/ldap/common.c b/source4/torture/ldap/common.c
index 50c5e03..9d53da4 100644
--- a/source4/torture/ldap/common.c
+++ b/source4/torture/ldap/common.c
@@ -131,7 +131,7 @@ NTSTATUS torture_ldap_close(struct ldap_connection *conn)
 
 NTSTATUS torture_ldap_init(TALLOC_CTX *ctx)
 {
-	struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "ldap");
+	struct torture_suite *suite = torture_suite_create(ctx, "ldap");
 	torture_suite_add_simple_test(suite, "bench-cldap", torture_bench_cldap);
 	torture_suite_add_simple_test(suite, "basic", torture_ldap_basic);
 	torture_suite_add_simple_test(suite, "sort", torture_ldap_sort);
@@ -144,7 +144,7 @@ NTSTATUS torture_ldap_init(TALLOC_CTX *ctx)
 
 	suite->description = talloc_strdup(suite, "LDAP and CLDAP tests");
 
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	return NT_STATUS_OK;
 }
diff --git a/source4/torture/libnet/libnet.c b/source4/torture/libnet/libnet.c
index 7b9c31a..faf7bca 100644
--- a/source4/torture/libnet/libnet.c
+++ b/source4/torture/libnet/libnet.c
@@ -27,7 +27,7 @@
 NTSTATUS torture_net_init(TALLOC_CTX *ctx)
 {
 	struct torture_suite *suite = torture_suite_create(
-		talloc_autofree_context(), "net");
+		ctx, "net");
 
 	torture_suite_add_simple_test(suite, "userinfo", torture_userinfo);
 	torture_suite_add_simple_test(suite, "useradd", torture_useradd);
@@ -64,7 +64,7 @@ NTSTATUS torture_net_init(TALLOC_CTX *ctx)
 
 	suite->description = talloc_strdup(suite, "libnet convenience interface tests");
 
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	return NT_STATUS_OK;
 }
diff --git a/source4/torture/libnetapi/libnetapi.c b/source4/torture/libnetapi/libnetapi.c
index 856b2c8..9d3973a 100644
--- a/source4/torture/libnetapi/libnetapi.c
+++ b/source4/torture/libnetapi/libnetapi.c
@@ -84,7 +84,7 @@ NTSTATUS torture_libnetapi_init(TALLOC_CTX *ctx)
 {
 	struct torture_suite *suite;
 
-	suite = torture_suite_create(talloc_autofree_context(), "netapi");
+	suite = torture_suite_create(ctx, "netapi");
 
 	torture_suite_add_simple_test(suite, "server", torture_libnetapi_server);
 	torture_suite_add_simple_test(suite, "group", torture_libnetapi_group);
@@ -93,7 +93,7 @@ NTSTATUS torture_libnetapi_init(TALLOC_CTX *ctx)
 
 	suite->description = talloc_strdup(suite, "libnetapi convenience interface tests");
 
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	return NT_STATUS_OK;
 }
diff --git a/source4/torture/libsmbclient/libsmbclient.c b/source4/torture/libsmbclient/libsmbclient.c
index c714a97..b93fda0 100644
--- a/source4/torture/libsmbclient/libsmbclient.c
+++ b/source4/torture/libsmbclient/libsmbclient.c
@@ -205,7 +205,7 @@ NTSTATUS torture_libsmbclient_init(TALLOC_CTX *ctx)
 {
 	struct torture_suite *suite;
 
-	suite = torture_suite_create(talloc_autofree_context(), "libsmbclient");
+	suite = torture_suite_create(ctx, "libsmbclient");
 
 	torture_suite_add_simple_test(suite, "version", torture_libsmbclient_version);
 	torture_suite_add_simple_test(suite, "initialize", torture_libsmbclient_initialize);
@@ -215,7 +215,7 @@ NTSTATUS torture_libsmbclient_init(TALLOC_CTX *ctx)
 
 	suite->description = talloc_strdup(suite, "libsmbclient interface tests");
 
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	return NT_STATUS_OK;
 }
diff --git a/source4/torture/local/local.c b/source4/torture/local/local.c
index e723152..d1c523b 100644
--- a/source4/torture/local/local.c
+++ b/source4/torture/local/local.c
@@ -83,7 +83,7 @@ NTSTATUS torture_local_init(TALLOC_CTX *ctx)
 {
 	int i;
 	struct torture_suite *suite = torture_suite_create(
-		talloc_autofree_context(), "local");
+		ctx, "local");
 	
 	torture_suite_add_simple_test(suite, "talloc", torture_local_talloc);
 	torture_suite_add_simple_test(suite, "replace", torture_local_replace);
@@ -103,12 +103,12 @@ NTSTATUS torture_local_init(TALLOC_CTX *ctx)
 
 	for (i = 0; suite_generators[i]; i++)
 		torture_suite_add_suite(suite,
-					suite_generators[i](talloc_autofree_context()));
+					suite_generators[i](ctx));
 	
 	suite->description = talloc_strdup(suite, 
 					   "Local, Samba-specific tests");
 
-	torture_register_suite(suite);
+	torture_register_suite(ctx, suite);
 
 	return NT_STATUS_OK;
 }
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c
index ac8d854..7047554 100644
--- a/source4/torture/locktest.c
+++ b/source4/torture/locktest.c
@@ -580,18 +580,26 @@ int main(int argc, const char *argv[])
 		POPT_COMMON_VERSION
 		{ NULL }
 	};
+	TALLOC_CTX *mem_ctx = NULL;
+	int ret = -1;
 
 	setlinebuf(stdout);
 	seed = time(NULL);
 
+	mem_ctx = talloc_named_const(NULL, 0, "locktest_ctx");
+	if (mem_ctx == NULL) {
+		printf("Unable to allocate locktest_ctx\n");
+		exit(1);
+	}
+
 	pc = poptGetContext("locktest", argc, argv, long_options,
 			    POPT_CONTEXT_KEEP_FIRST);
 
 	poptSetOtherOptionHelp(pc, "<unc1> <unc2>");
 
 	lp_ctx = cmdline_lp_ctx;
-	servers[0] = cli_credentials_init(talloc_autofree_context());
-	servers[1] = cli_credentials_init(talloc_autofree_context());
+	servers[0] = cli_credentials_init(mem_ctx);
+	servers[1] = cli_credentials_init(mem_ctx);
 	cli_credentials_guess(servers[0], lp_ctx);
 	cli_credentials_guess(servers[1], lp_ctx);
 
@@ -603,6 +611,7 @@ int main(int argc, const char *argv[])
 		case 'U':
 			if (username_count == 2) {
 				usage(pc);
+				talloc_free(mem_ctx);
 				exit(1);
 			}
 			cli_credentials_parse_string(servers[username_count], poptGetOptArg(pc), CRED_SPECIFIED);
@@ -642,7 +651,7 @@ int main(int argc, const char *argv[])
 		servers[1] = servers[0];
 	}
 
-	ev = s4_event_context_init(talloc_autofree_context());
+	ev = s4_event_context_init(mem_ctx);
 
 	gensec_init();
 
@@ -650,6 +659,8 @@ int main(int argc, const char *argv[])
 		 seed, lock_base, lock_range, min_length));
 	srandom(seed);
 
-	return test_locks(ev, lp_ctx, NULL, share);
+	ret = test_locks(ev, lp_ctx, NULL, share);


-- 
Samba Shared Repository



More information about the samba-cvs mailing list