summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-09-09 21:26:43 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-09-09 21:26:43 +0200
commitad25264dd7c815449ee361d342fd3b7e74f8d0bb (patch)
tree22367eda8b6d2552a91ca0b193167b130f11872a /source4
parent59559bd02fb2dfaf19c0b4b86f5443115dd17f38 (diff)
downloadsamba-ad25264dd7c815449ee361d342fd3b7e74f8d0bb.tar.gz
samba-ad25264dd7c815449ee361d342fd3b7e74f8d0bb.tar.bz2
samba-ad25264dd7c815449ee361d342fd3b7e74f8d0bb.zip
s4:torture/rpc/winreg.c - restore Solaris cc compatibility
"static const struct"s need to be global in order to work with Solaris cc.
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/winreg.c143
1 files changed, 72 insertions, 71 deletions
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 9ee68c6565..c2dd8b1e3e 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -2405,83 +2405,84 @@ static bool test_create_keynames(struct dcerpc_binding_handle *b,
#define VALUE_CURRENT_VERSION "CurrentVersion"
#define VALUE_SYSTEM_ROOT "SystemRoot"
+static const struct {
+ const char *values[3];
+ uint32_t num_values;
+ bool existing_value;
+ const char *error_message;
+} multiple_values_tests[] = {
+ {
+ .values[0] = VALUE_CURRENT_VERSION,
+ .values[1] = NULL,
+ .values[2] = NULL,
+ .num_values = 1,
+ .existing_value = true,
+ .error_message = NULL
+ },{
+ .values[0] = VALUE_SYSTEM_ROOT,
+ .values[1] = NULL,
+ .values[2] = NULL,
+ .num_values = 1,
+ .existing_value = true,
+ .error_message = NULL
+ },{
+ .values[0] = VALUE_CURRENT_VERSION,
+ .values[1] = VALUE_SYSTEM_ROOT,
+ .values[2] = NULL,
+ .num_values = 2,
+ .existing_value = true,
+ .error_message = NULL
+ },{
+ .values[0] = VALUE_CURRENT_VERSION,
+ .values[1] = VALUE_SYSTEM_ROOT,
+ .values[2] = VALUE_CURRENT_VERSION,
+ .num_values = 3,
+ .existing_value = true,
+ .error_message = NULL
+ },{
+ .values[0] = VALUE_CURRENT_VERSION,
+ .values[1] = NULL,
+ .values[2] = VALUE_SYSTEM_ROOT,
+ .num_values = 3,
+ .existing_value = false,
+ .error_message = NULL
+ },{
+ .values[0] = VALUE_CURRENT_VERSION,
+ .values[1] = "",
+ .values[2] = VALUE_SYSTEM_ROOT,
+ .num_values = 3,
+ .existing_value = false,
+ .error_message = NULL
+ },{
+ .values[0] = "IDoNotExist",
+ .values[1] = NULL,
+ .values[2] = NULL,
+ .num_values = 1,
+ .existing_value = false,
+ .error_message = NULL
+ },{
+ .values[0] = "IDoNotExist",
+ .values[1] = VALUE_CURRENT_VERSION,
+ .values[2] = NULL,
+ .num_values = 2,
+ .existing_value = false,
+ .error_message = NULL
+ },{
+ .values[0] = VALUE_CURRENT_VERSION,
+ .values[1] = "IDoNotExist",
+ .values[2] = NULL,
+ .num_values = 2,
+ .existing_value = false,
+ .error_message = NULL
+ }
+};
+
static bool test_HKLM_wellknown(struct torture_context *tctx,
struct dcerpc_binding_handle *b,
struct policy_handle *handle)
{
struct policy_handle newhandle;
int i;
- static const struct {
- const char *values[3];
- uint32_t num_values;
- bool existing_value;
- const char *error_message;
- } multiple_values_tests[] = {
- {
- .values[0] = VALUE_CURRENT_VERSION,
- .values[1] = NULL,
- .values[2] = NULL,
- .num_values = 1,
- .existing_value = true,
- .error_message = NULL
- },{
- .values[0] = VALUE_SYSTEM_ROOT,
- .values[1] = NULL,
- .values[2] = NULL,
- .num_values = 1,
- .existing_value = true,
- .error_message = NULL
- },{
- .values[0] = VALUE_CURRENT_VERSION,
- .values[1] = VALUE_SYSTEM_ROOT,
- .values[2] = NULL,
- .num_values = 2,
- .existing_value = true,
- .error_message = NULL
- },{
- .values[0] = VALUE_CURRENT_VERSION,
- .values[1] = VALUE_SYSTEM_ROOT,
- .values[2] = VALUE_CURRENT_VERSION,
- .num_values = 3,
- .existing_value = true,
- .error_message = NULL
- },{
- .values[0] = VALUE_CURRENT_VERSION,
- .values[1] = NULL,
- .values[2] = VALUE_SYSTEM_ROOT,
- .num_values = 3,
- .existing_value = false,
- .error_message = NULL
- },{
- .values[0] = VALUE_CURRENT_VERSION,
- .values[1] = "",
- .values[2] = VALUE_SYSTEM_ROOT,
- .num_values = 3,
- .existing_value = false,
- .error_message = NULL
- },{
- .values[0] = "IDoNotExist",
- .values[1] = NULL,
- .values[2] = NULL,
- .num_values = 1,
- .existing_value = false,
- .error_message = NULL
- },{
- .values[0] = "IDoNotExist",
- .values[1] = VALUE_CURRENT_VERSION,
- .values[2] = NULL,
- .num_values = 2,
- .existing_value = false,
- .error_message = NULL
- },{
- .values[0] = VALUE_CURRENT_VERSION,
- .values[1] = "IDoNotExist",
- .values[2] = NULL,
- .num_values = 2,
- .existing_value = false,
- .error_message = NULL
- }
- };
/* FIXME: s3 does not support SEC_FLAG_MAXIMUM_ALLOWED yet */
if (torture_setting_bool(tctx, "samba3", false)) {