[SCM] Samba Shared Repository - branch master updated

[email protected] (David Disseldorp)
Newsgroups gmane.network.samba.cvs
Message-ID <[email protected]>
The branch, master has been updated
       via  79bbd81 python/provision: Remove unused parameter schema
       via  4d918d5 s4-torture: test valid environment in spoolss_EnumMonitors level 2.
       via  941173d s3-spoolss: use architecture in spoolss_MonitorInfo calls consistently
      from  54e392b ctdb-recovery: Avoid NULL dereference in failure case

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


- Log -----------------------------------------------------------------
commit 79bbd81963b383e471860bd7e0fbec96672414cd
Author: Andrew Bartlett <[email protected]>
Date:   Mon Nov 21 12:31:24 2016 +1300

    python/provision: Remove unused parameter schema
    
    Signed-off-by: Andrew Bartlett <[email protected]>
    Reviewed-by: David Disseldorp <[email protected]>
    
    Autobuild-User(master): David Disseldorp <[email protected]>
    Autobuild-Date(master): Mon Nov 21 18:49:12 CET 2016 on sn-devel-144

commit 4d918d510070ce6b2aaa971588795f91187a2950
Author: Günther Deschner <[email protected]>
Date:   Mon Nov 21 12:44:54 2016 +0100

    s4-torture: test valid environment in spoolss_EnumMonitors level 2.
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: David Disseldorp <[email protected]>

commit 941173d14ce509af297a63cc897e0f614b72daff
Author: Günther Deschner <[email protected]>
Date:   Mon Nov 21 11:27:31 2016 +0100

    s3-spoolss: use architecture in spoolss_MonitorInfo calls consistently
    
    Signed-off-by: Guenther Deschner <[email protected]>
    Reviewed-by: David Disseldorp <[email protected]>

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

Summary of changes:
 python/samba/provision/__init__.py          |  4 ++--
 source3/rpc_server/spoolss/srv_spoolss_nt.c | 10 ++++++++--
 source4/torture/rpc/spoolss.c               |  1 +
 3 files changed, 11 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py
index e68db74..faa4b0c 100644
--- a/python/samba/provision/__init__.py
+++ b/python/samba/provision/__init__.py
@@ -787,7 +787,7 @@ def setup_name_mappings(idmap, sid, root_uid, nobody_uid,
 
 
 def setup_samdb_partitions(samdb_path, logger, lp, session_info,
-                           provision_backend, names, schema, serverrole,
+                           provision_backend, names, serverrole,
                            erase=False):
     """Setup the partitions for the SAM database.
 
@@ -1191,7 +1191,7 @@ def setup_samdb(path, session_info, provision_backend, lp, names,
     # Also wipes the database
     setup_samdb_partitions(path, logger=logger, lp=lp,
         provision_backend=provision_backend, session_info=session_info,
-        names=names, serverrole=serverrole, schema=schema)
+        names=names, serverrole=serverrole)
 
     # Load the database, but don's load the global schema and don't connect
     # quite yet
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 45061b6..06f704d 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -9533,15 +9533,21 @@ static WERROR enumprintmonitors_level_2(TALLOC_CTX *mem_ctx,
 {
 	union spoolss_MonitorInfo *info;
 	WERROR result = WERR_OK;
+	const char *architecture;
 
 	info = talloc_array(mem_ctx, union spoolss_MonitorInfo, 2);
 	W_ERROR_HAVE_NO_MEMORY(info);
 
 	*count = 2;
 
+	architecture = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+					    "spoolss",
+					    "architecture",
+					    SPOOLSS_ARCHITECTURE_NT_X86);
+
 	result = fill_monitor_2(info, &info[0].info2,
 				SPL_LOCAL_PORT,
-				"Windows NT X86", /* FIXME */
+				architecture,
 				"localmon.dll");
 	if (!W_ERROR_IS_OK(result)) {
 		goto out;
@@ -9549,7 +9555,7 @@ static WERROR enumprintmonitors_level_2(TALLOC_CTX *mem_ctx,
 
 	result = fill_monitor_2(info, &info[1].info2,
 				SPL_TCPIP_PORT,
-				"Windows NT X86", /* FIXME */
+				architecture,
 				"tcpmon.dll");
 	if (!W_ERROR_IS_OK(result)) {
 		goto out;
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 751a3b2..81efff8 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -863,6 +863,7 @@ static bool test_EnumMonitors(struct torture_context *tctx,
 				COMPARE_STRING(tctx, cur->info1, ref->info2, monitor_name);
 				break;
 			case 2:
+				torture_assert_str_equal(tctx, ref->info2.environment, ctx->environment, "invalid environment");
 				/* level 2 is our reference, and it makes no sense to compare it to itself */
 				break;
 			}


-- 
Samba Shared Repository
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.