[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Tue Mar 16 08:14:01 MDT 2010


The branch, master has been updated
       via  b4d0913... s3-registry: make sure root has full registry access (in particular for make test).
       via  27d46ba... s4-smbtorture: make it a bit easier to track failures in RPC-SPOOLSS-PRINTER.
      from  38cba5e... s4:torture-ndr add lsarSetForestTrustInformation ndr test

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


- Log -----------------------------------------------------------------
commit b4d09134fdb4e99aa42b5db3e6d54014e090a23c
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 16 13:53:54 2010 +0100

    s3-registry: make sure root has full registry access (in particular for make test).
    
    Guenther

commit 27d46ba266908ad5fa5be9e553b41839dfa7d9c8
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 16 13:52:48 2010 +0100

    s4-smbtorture: make it a bit easier to track failures in RPC-SPOOLSS-PRINTER.
    
    Guenther

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

Summary of changes:
 source3/registry/reg_dispatcher.c |    6 ++++++
 source4/torture/rpc/spoolss.c     |   20 +++++++++++++++-----
 2 files changed, 21 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/registry/reg_dispatcher.c b/source3/registry/reg_dispatcher.c
index cc6d95f..0c3ceec 100644
--- a/source3/registry/reg_dispatcher.c
+++ b/source3/registry/reg_dispatcher.c
@@ -165,6 +165,12 @@ bool regkey_access_check(struct registry_key_handle *key, uint32 requested,
 	NTSTATUS status;
 	WERROR err;
 
+	/* root free-pass, like we have on all other pipes like samr, lsa, etc. */
+	if (geteuid() == sec_initial_uid()) {
+		*granted = REG_KEY_ALL;
+		return true;
+	}
+
 	/* use the default security check if the backend has not defined its
 	 * own */
 
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 7ce0a7c..1af0543 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -1780,7 +1780,7 @@ static bool test_PrinterInfo_SD(struct torture_context *tctx,
 	struct security_descriptor *sd;
 	bool ret = true;
 
-	torture_comment(tctx, "\nTesting Printer Security Descriptors\n");
+	torture_comment(tctx, "Testing Printer Security Descriptors\n");
 
 	/* save original sd */
 
@@ -1798,7 +1798,7 @@ static bool test_PrinterInfo_SD(struct torture_context *tctx,
 	torture_assert(tctx, test_sd_set_level(tctx, p, handle, 3, sd),
 		"failed to restore initial security descriptor");
 
-	torture_comment(tctx, "Printer Security Descriptors test %s\n",
+	torture_comment(tctx, "Printer Security Descriptors test %s\n\n",
 		ret ? "succeeded" : "failed");
 
 
@@ -2161,7 +2161,7 @@ static bool test_PrinterInfo_DevMode(struct torture_context *tctx,
 	struct spoolss_DeviceMode *devmode;
 	bool ret = true;
 
-	torture_comment(tctx, "\nTesting Printer Devicemodes\n");
+	torture_comment(tctx, "Testing Printer Devicemodes\n");
 
 	/* save original devmode */
 
@@ -2179,7 +2179,7 @@ static bool test_PrinterInfo_DevMode(struct torture_context *tctx,
 	torture_assert(tctx, test_devmode_set_level(tctx, p, handle, 8, devmode),
 		"failed to restore initial global device mode");
 
-	torture_comment(tctx, "Printer Devicemodes test %s\n",
+	torture_comment(tctx, "Printer Devicemodes test %s\n\n",
 		ret ? "succeeded" : "failed");
 
 
@@ -3078,6 +3078,8 @@ static bool test_EnumPrinterData_all(struct torture_context *tctx,
 	const char *value_name;
 	WERROR result;
 
+	torture_comment(tctx, "Testing EnumPrinterData\n");
+
 	do {
 		torture_assert(tctx,
 			test_EnumPrinterData(tctx, p, handle, enum_index, 0, 0,
@@ -3103,6 +3105,8 @@ static bool test_EnumPrinterData_all(struct torture_context *tctx,
 
 	} while (W_ERROR_IS_OK(result));
 
+	torture_comment(tctx, "EnumPrinterData test succeeded\n");
+
 	return true;
 }
 
@@ -3985,6 +3989,8 @@ static bool test_ChangeID(struct torture_context *tctx,
 		talloc_asprintf(tctx, "change_id %d needs to be larger than change_id %d",
 		change_id_info2, change_id_info));
 
+	torture_comment(tctx, "ChangeID tests succeeded\n\n");
+
 	return true;
 }
 
@@ -4247,6 +4253,8 @@ static bool test_printer_rename(struct torture_context *tctx,
 		test_ClosePrinter(tctx, p, &new_handle),
 		"failed to close printer");
 
+	torture_comment(tctx, "Printer rename operations test succeeded\n\n");
+
 	return ret;
 }
 
@@ -5046,7 +5054,7 @@ bool test_printer_keys(struct torture_context *tctx,
 	const char **key_array = NULL;
 	int i;
 
-	torture_comment(tctx, "\nTesting Printer Keys\n");
+	torture_comment(tctx, "Testing Printer Keys\n");
 
 	torture_assert(tctx, test_EnumPrinterKey(tctx, p, handle, "", &key_array),
 		"failed to call test_EnumPrinterKey");
@@ -5060,6 +5068,8 @@ bool test_printer_keys(struct torture_context *tctx,
 			"failed to call test_EnumPrinterDataEx");
 	}
 
+	torture_comment(tctx, "Printer Keys test succeeded\n\n");
+
 	return true;
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list