Rev 11918: Run some more tests. in file:///home/jelmer/bzr.samba/SAMBA_4_0/

Jelmer Vernooij jelmer at samba.org
Wed Apr 18 15:42:52 GMT 2007


At file:///home/jelmer/bzr.samba/SAMBA_4_0/

------------------------------------------------------------
revno: 11918
revision-id: jelmer at samba.org-20070418154240-9anrimzbqc2zwbl7
parent: svn-v2:22338 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: SAMBA_4_0
timestamp: Wed 2007-04-18 17:42:40 +0200
message:
  Run some more tests.
modified:
  source/librpc/idl/wkssvc.idl   svn-v2:6 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2flibrpc%2fidl%2fwkssvc.idl
  source/samba4-knownfail        svn-v2:19388 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fsamba4%2dknownfail
  source/samba4-skip             svn-v2:21709 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fsamba4%2dskip
  source/script/tests/Samba3.pm  svn-v2:21909 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2fSamba3.pm
  source/script/tests/selftest.pl svn-v2:20693 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2fselftest.pl
  source/script/tests/test_rpc.sh svn-v2:3393 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2ftest_rpc.sh
  source/torture/rpc/winreg.c    svn-v2:6 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2ftorture%2frpc%2fwinreg.c
  source/torture/rpc/wkssvc.c    svn-v2:6 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2ftorture%2frpc%2fwkssvc.c
=== modified file 'source/librpc/idl/wkssvc.idl'
--- a/source/librpc/idl/wkssvc.idl	2006-11-06 22:54:49 +0000
+++ b/source/librpc/idl/wkssvc.idl	2007-04-18 15:42:40 +0000
@@ -8,7 +8,8 @@
   version(1.0),
   pointer_default(unique),
   pointer_default_top(unique),
-  helpstring("Workstation Service")
+  helpstring("Workstation Service"),
+  endpoint("ncacn_np:[\\pipe\\wkssvc]","ncacn_ip_tcp:","ncalrpc:")
 ] interface wkssvc
 {
 	declare [v1_enum] enum srvsvc_PlatformId;

=== modified file 'source/samba4-knownfail'
--- a/source/samba4-knownfail	2007-03-05 21:28:55 +0000
+++ b/source/samba4-knownfail	2007-04-18 15:42:40 +0000
@@ -3,3 +3,6 @@
 LOCAL-ICONV/next_codepoint()
 BASE-DELAYWRITE/finfo update on close
 RAW-OPLOCK/OPLOCK
+RPC-WINREG
+RPC-WKSSVC.*NetWkstaGetInfo
+RPC-WKSSVC.*NetWkstaTransportEnum

=== modified file 'source/samba4-skip'
--- a/source/samba4-skip	2007-04-12 02:27:25 +0000
+++ b/source/samba4-skip	2007-04-18 15:42:40 +0000
@@ -37,3 +37,9 @@
 ntvfs/cifs RAW-SAMBA3BADPATH
 ntvfs/cifs RAW-SCAN-EAMAX
 ntvfs/cifs RAW-CONTEXT
+RPC-SVCCTL
+RPC-DSSYNC
+RPC-EPMAPPER
+RPC-INITSHUTDOWN
+RPC-WINREG
+RPC-SAMSYNC

=== modified file 'source/script/tests/Samba3.pm'
--- a/source/script/tests/Samba3.pm	2007-04-18 14:02:26 +0000
+++ b/source/script/tests/Samba3.pm	2007-04-18 15:42:40 +0000
@@ -115,7 +115,7 @@
 
 	unlink($env_vars->{SMBD_TEST_LOG});
 	print "STARTING SMBD...";
-	my $pid = fork();
+	$pid = fork();
 	if ($pid == 0) {
 		open STDOUT, ">$env_vars->{SMBD_TEST_LOG}";
 		open STDERR, '>&STDOUT';

=== modified file 'source/script/tests/selftest.pl'
--- a/source/script/tests/selftest.pl	2007-04-18 14:18:33 +0000
+++ b/source/script/tests/selftest.pl	2007-04-18 15:42:40 +0000
@@ -172,7 +172,10 @@
 {
 	my $fullname = shift;
 
-	return 1 if (grep(/^$fullname$/, @skips));
+	foreach (@skips) {
+		return 1 if ($fullname =~ /$_/);
+	}
+
 	return 0;
 }
 

=== modified file 'source/script/tests/test_rpc.sh'
--- a/source/script/tests/test_rpc.sh	2007-04-11 11:17:09 +0000
+++ b/source/script/tests/test_rpc.sh	2007-04-18 15:42:40 +0000
@@ -2,9 +2,9 @@
 
 # add tests to this list as they start passing, so we test
 # that they stay passing
-ncacn_np_tests="RPC-SPOOLSS RPC-SRVSVC RPC-UNIXINFO RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-ECHO RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-MGMT RPC-HANDLES"
-ncalrpc_tests="RPC-MGMT RPC-UNIXINFO RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-ECHO RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON"
-ncacn_ip_tcp_tests="RPC-UNIXINFO RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-ECHO RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-MGMT RPC-HANDLES"
+ncacn_np_tests="RPC-SPOOLSS RPC-SRVSVC RPC-UNIXINFO RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-ECHO RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-MGMT RPC-HANDLES RPC-WINREG RPC-WKSSVC RPC-SVCCTL RPC-EPMAPPER RPC-INITSHUTDOWN RPC-EVENTLOG RPC-ATSVC RPC-SAMSYNC"
+ncalrpc_tests="RPC-MGMT RPC-UNIXINFO RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-ECHO RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-WINREG RPC-WKSSVC RPC-SVCCTL RPC-EPMAPPER RPC-EVENTLOG RPC-ATSVC RPC-INITSHUTDOWN"
+ncacn_ip_tcp_tests="RPC-UNIXINFO RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-ECHO RPC-DSSETUP RPC-ALTERCONTEXT RPC-MULTIBIND RPC-NETLOGON RPC-MGMT RPC-HANDLES RPC-WINREG RPC-WKSSVC RPC-SVCCTL RPC-EPMAPPER RPC-ATSVC RPC-EVENTLOG RPC-DSSYNC"
 slow_ncacn_np_tests="RPC-SAMLOGON RPC-SAMR RPC-SAMR-USERS RPC-SAMR-PASSWORDS RPC-COUNTCALLS"
 slow_ncalrpc_tests="RPC-SAMR RPC-SAMR-PASSWORDS RPC-COUNTCALLS RPC-CRACKNAMES"
 slow_ncacn_ip_tcp_tests="RPC-SAMR RPC-SAMR-PASSWORDS RPC-COUNTCALLS RPC-CRACKNAMES"

=== modified file 'source/torture/rpc/winreg.c'
--- a/source/torture/rpc/winreg.c	2007-03-05 01:50:33 +0000
+++ b/source/torture/rpc/winreg.c	2007-04-18 15:42:40 +0000
@@ -49,7 +49,7 @@
 	}
 }
 
-static BOOL test_GetVersion(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_GetVersion(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 			    struct policy_handle *handle)
 {
 	NTSTATUS status;
@@ -65,18 +65,18 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("GetVersion failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("GetVersion failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_NotifyChangeKeyValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_NotifyChangeKeyValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 									  struct policy_handle *handle)
 {
 	struct winreg_NotifyChangeKeyValue r;
@@ -95,18 +95,18 @@
 	
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("NotifyChangeKeyValue failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("NotifyChangeKeyValue failed - %s - not considering\n", win_errstr(r.out.result));
-		return True;
+		return true;
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_CreateKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+static bool test_CreateKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 			  struct policy_handle *handle, const char *name, 
 			   const char *class)
 {
@@ -130,22 +130,22 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("CreateKey failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("CreateKey failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
 
 /*
   createkey testing with a SD
 */
-static BOOL test_CreateKey_sd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+static bool test_CreateKey_sd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 			      struct policy_handle *handle, const char *name, 
 			      const char *class, struct policy_handle *newhandle)
 {
@@ -168,7 +168,7 @@
 				      (ndr_push_flags_fn_t)ndr_push_security_descriptor);
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("Failed to push security_descriptor ?!\n");
-		return False;
+		return false;
 	}
 
 	secbuf.sd.data = sdblob.data;
@@ -192,18 +192,18 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("CreateKey with sd failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("CreateKey with sd failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_GetKeySecurity(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_GetKeySecurity(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 			  struct policy_handle *handle)
 {
 	NTSTATUS status;
@@ -224,12 +224,12 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("GetKeySecurity failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("GetKeySecurity failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
 	sdblob.data = r.out.sd->data;
@@ -239,16 +239,16 @@
 				      (ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("pull_security_descriptor failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 	if (p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
 		NDR_PRINT_DEBUG(security_descriptor, &sd);
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_CloseKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_CloseKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 			  struct policy_handle *handle)
 {
 	NTSTATUS status;
@@ -262,18 +262,18 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("CloseKey failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("CloseKey failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_FlushKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_FlushKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 			  struct policy_handle *handle)
 {
 	NTSTATUS status;
@@ -287,18 +287,18 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("FlushKey failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("FlushKey failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_OpenKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_OpenKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 			 struct policy_handle *hive_handle,
 			 const char *keyname, struct policy_handle *key_handle)
 {
@@ -317,19 +317,19 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("OpenKey failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("OpenKey failed - %s\n", win_errstr(r.out.result));
 
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_Cleanup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_Cleanup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 			 struct policy_handle *handle, const char *key)
 {
 	struct winreg_DeleteKey r;
@@ -339,11 +339,11 @@
 	init_winreg_String(&r.in.key, key);
 	dcerpc_winreg_DeleteKey(p, mem_ctx, &r);
 
-	return True;
+	return true;
 }
 
 
-static BOOL test_DeleteKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_DeleteKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 			   struct policy_handle *handle, const char *key)
 {
 	NTSTATUS status;
@@ -358,18 +358,18 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("DeleteKey failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("DeleteKey failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_QueryInfoKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+static bool test_QueryInfoKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 			      struct policy_handle *handle, char *class)
 {
 	NTSTATUS status;
@@ -391,6 +391,8 @@
 	r.out.max_valbufsize = &max_valbufsize;
 	r.out.secdescsize = &secdescsize;
 	r.out.last_changed_time = &last_changed_time;
+
+	r.out.classname = talloc(mem_ctx, struct winreg_String);
 	
 	r.in.classname = talloc(mem_ctx, struct winreg_String);
 	init_winreg_String(r.in.classname, class);
@@ -399,21 +401,21 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("QueryInfoKey failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("QueryInfoKey failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_key(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_key(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 		     struct policy_handle *handle, int depth);
 
-static BOOL test_EnumKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_EnumKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 			 struct policy_handle *handle, int depth)
 {
 	struct winreg_EnumKey r;
@@ -458,20 +460,20 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("EnumKey failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result) && !W_ERROR_EQUAL(r.out.result, WERR_NO_MORE_ITEMS)) {
 		printf("EnumKey failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
 
 
-	return True;
+	return true;
 }
 
-static BOOL test_QueryMultipleValues(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *valuename)
+static bool test_QueryMultipleValues(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *valuename)
 {
 	struct winreg_QueryMultipleValues r;
 	NTSTATUS status;
@@ -499,7 +501,7 @@
 	
 		if(NT_STATUS_IS_ERR(status)) {
 			printf("QueryMultipleValues failed - %s\n", nt_errstr(status));
-			return False;
+			return false;
 		}
 		talloc_free(r.in.buffer);
 		bufsize += 0x20;
@@ -507,13 +509,13 @@
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("QueryMultipleValues failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_QueryValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *valuename)
+static bool test_QueryValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *valuename)
 {
 	struct winreg_QueryValue r;
 	NTSTATUS status;
@@ -533,24 +535,24 @@
 	status = dcerpc_winreg_QueryValue(p, mem_ctx, &r);
 	if(NT_STATUS_IS_ERR(status)) {
 		printf("QueryValue failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("QueryValue failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_EnumValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_EnumValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 			   struct policy_handle *handle, int max_valnamelen, int max_valbufsize)
 {
 	struct winreg_EnumValue r;
 	enum winreg_Type type = 0;
 	uint32_t size = max_valbufsize, zero = 0;
-	BOOL ret = True;
+	bool ret = true;
 	uint8_t buf8;
 	struct winreg_StringBuf name;
 
@@ -572,7 +574,7 @@
 		NTSTATUS status = dcerpc_winreg_EnumValue(p, mem_ctx, &r);
 		if(NT_STATUS_IS_ERR(status)) {
 			printf("EnumValue failed - %s\n", nt_errstr(status));
-			return False;
+			return false;
 		}
 
 		if (W_ERROR_IS_OK(r.out.result)) {
@@ -585,13 +587,13 @@
 
 	if(!W_ERROR_EQUAL(r.out.result, WERR_NO_MORE_ITEMS)) {
 		printf("EnumValue failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
 	return ret;
 }
 
-static BOOL test_InitiateSystemShutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+static bool test_InitiateSystemShutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 			const char *msg, uint32_t timeout)
 {
 	struct winreg_InitiateSystemShutdown r;
@@ -609,18 +611,18 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("InitiateSystemShutdown failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("InitiateSystemShutdown failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_InitiateSystemShutdownEx(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+static bool test_InitiateSystemShutdownEx(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 			const char *msg, uint32_t timeout)
 {
 	struct winreg_InitiateSystemShutdownEx r;
@@ -639,18 +641,18 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("InitiateSystemShutdownEx failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("InitiateSystemShutdownEx failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
-static BOOL test_AbortSystemShutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
+static bool test_AbortSystemShutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 {
 	struct winreg_AbortSystemShutdown r;
 	NTSTATUS status;
@@ -662,29 +664,28 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		printf("AbortSystemShutdown failed - %s\n", nt_errstr(status));
-		return False;
+		return false;
 	}
 
 	if (!W_ERROR_IS_OK(r.out.result)) {
 		printf("AbortSystemShutdown failed - %s\n", win_errstr(r.out.result));
-		return False;
+		return false;
 	}
 
-	return True;
+	return true;
 }
 
 #define MAX_DEPTH 2		/* Only go this far down the tree */
 
-static BOOL test_key(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_key(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 		     struct policy_handle *handle, int depth)
 {
 	if (depth == MAX_DEPTH)
-		return True;
+		return true;
 
 	if (!test_QueryInfoKey(p, mem_ctx, handle, NULL)) {
 	}
 
-
 	if (!test_NotifyChangeKeyValue(p, mem_ctx, handle)) {
 	}
 	
@@ -697,19 +698,18 @@
 	if (!test_EnumValue(p, mem_ctx, handle, 0xFF, 0xFFFF)) {
 	}
 
-
 	test_CloseKey(p, mem_ctx, handle);
 
-	return True;
+	return true;
 }
 
 typedef NTSTATUS (*winreg_open_fn)(struct dcerpc_pipe *, TALLOC_CTX *, void *);
 
-static BOOL test_Open(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+static bool test_Open(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
 		      const char *name, winreg_open_fn open_fn)
 {
 	struct policy_handle handle, newhandle;
-	BOOL ret = True, created = False, created2 = False, deleted = False;
+	bool ret = true, created = false, created2 = false, deleted = false;
 	struct winreg_OpenHKLM r;
 	NTSTATUS status;
 
@@ -721,7 +721,7 @@
 	
 	status = open_fn(p, mem_ctx, &r);
 	if (!NT_STATUS_IS_OK(status)) {
-		return False;
+		return false;
 	}
 
 	test_Cleanup(p, mem_ctx, &handle, TEST_KEY1);
@@ -731,72 +731,72 @@
 	if (!test_CreateKey(p, mem_ctx, &handle, TEST_KEY1, NULL)) {
 		printf("CreateKey failed - not considering a failure\n");
 	} else {
-		created = True;
+		created = true;
 	}
 
 	if (created && !test_FlushKey(p, mem_ctx, &handle)) {
 		printf("FlushKey failed\n");
-		ret = False;
+		ret = false;
 	}
 
 	if (created && !test_OpenKey(p, mem_ctx, &handle, TEST_KEY1, &newhandle)) {
 		printf("CreateKey failed (OpenKey after Create didn't work)\n");
-		ret = False;
+		ret = false;
 	}
 
 	if (created && !test_DeleteKey(p, mem_ctx, &handle, TEST_KEY1)) {
 		printf("DeleteKey failed\n");
-		ret = False;
+		ret = false;
 	} else {
-		deleted = True;
+		deleted = true;
 	}
 
 	if (created && !test_FlushKey(p, mem_ctx, &handle)) {
 		printf("FlushKey failed\n");
-		ret = False;
+		ret = false;
 	}
 
 	if (created && deleted && 
 	    test_OpenKey(p, mem_ctx, &handle, TEST_KEY1, &newhandle)) {
 		printf("DeleteKey failed (OpenKey after Delete didn't work)\n");
-		ret = False;
+		ret = false;
 	}
 
 	if (!test_GetVersion(p, mem_ctx, &handle)) {
 		printf("GetVersion failed\n");
-		ret = False;
+		ret = false;
 	}
 
 	if (created && test_CreateKey_sd(p, mem_ctx, &handle, TEST_KEY2, 
 					  NULL, &newhandle)) {
-		created2 = True;
+		created2 = true;
 	}
 
 	if (created2 && !test_GetKeySecurity(p, mem_ctx, &newhandle)) {
 		printf("GetKeySecurity failed\n");
-		ret = False;
+		ret = false;
 	}
 
 	if (created2 && !test_CloseKey(p, mem_ctx, &newhandle)) {
 		printf("CloseKey failed\n");
-		ret = False;
+		ret = false;
 	}
 
 	if (created && !test_DeleteKey(p, mem_ctx, &handle, TEST_KEY2)) {
 		printf("DeleteKey failed\n");
-		ret = False;
+		ret = false;
 	}
 
 	/* The HKCR hive has a very large fanout */
 
 	if (open_fn == (void *)dcerpc_winreg_OpenHKCR) {
 		if(!test_key(p, mem_ctx, &handle, MAX_DEPTH - 1)) {
-			ret = False;
+			ret = false;
 		}
 	}
 
 	if(!test_key(p, mem_ctx, &handle, 0)) {
-		ret = False;
+		ret = false;
 	}
 
 	test_Cleanup(p, mem_ctx, &handle, TEST_KEY_BASE);
@@ -804,12 +804,12 @@
 	return ret;
 }
 
-BOOL torture_rpc_winreg(struct torture_context *torture)
+bool torture_rpc_winreg(struct torture_context *torture)
 {
         NTSTATUS status;
 	struct dcerpc_pipe *p;
 	TALLOC_CTX *mem_ctx;
-	BOOL ret = True;
+	bool ret = true;
 	struct {
 		const char *name;
 		winreg_open_fn fn;
@@ -824,10 +824,10 @@
 
 	if (!NT_STATUS_IS_OK(status)) {
 		talloc_free(mem_ctx);
-		return False;
+		return false;
 	}
 
-	if (!torture_setting_bool(torture, "dangerous", False)) {
+	if (!torture_setting_bool(torture, "dangerous", false)) {
 		printf("winreg_InitiateShutdown disabled - enable dangerous tests to use\n");
 	} else {
 		ret &= test_InitiateSystemShutdown(p, mem_ctx, "spottyfood", 30);

=== modified file 'source/torture/rpc/wkssvc.c'
--- a/source/torture/rpc/wkssvc.c	2007-04-12 11:35:00 +0000
+++ b/source/torture/rpc/wkssvc.c	2007-04-18 15:42:40 +0000
@@ -78,8 +78,6 @@
 	return true;
 }
 
-
-
 struct torture_suite *torture_rpc_wkssvc(void)
 {
 	struct torture_suite *suite;



More information about the samba-cvs mailing list