summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-19 22:10:20 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-19 22:10:20 +0000
commit10ee36bede1337d73feec575cc840957090b30b2 (patch)
tree8d292361ad5e6bb1291fc3dbca191d1c44bd453b /source4/torture/rpc
parent5a51af068533357fbf0ae4ddfd169fb752ddd2b5 (diff)
downloadsamba-10ee36bede1337d73feec575cc840957090b30b2.tar.gz
samba-10ee36bede1337d73feec575cc840957090b30b2.tar.bz2
samba-10ee36bede1337d73feec575cc840957090b30b2.zip
switched to a new way of handling unions, so that we can handle
alignment correctly for unions that have non-uint16 discriminants fixed the union handling in srvsvc.idl. (metze, please take a look at the changes, your IDL did match what was one the wire in most cases, but isn't the way IDL is usually coded) (This used to be commit 7b5d0287298e8505e0ec7b22d75d9f9a8a610031)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/echo.c2
-rw-r--r--source4/torture/rpc/srvsvc.c78
-rw-r--r--source4/torture/rpc/wkssvc.c2
3 files changed, 38 insertions, 44 deletions
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index 8d8a3d7c0c..2ea7362e9a 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -224,7 +224,7 @@ BOOL torture_rpc_echo(int dummy)
return False;
}
-#if 1
+#if 0
if (!test_addone(p, mem_ctx)) {
ret = False;
}
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index 384959f26a..45103b8188 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -34,19 +34,18 @@ static BOOL test_NetConnEnum(struct dcerpc_pipe *p,
r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p));
r.in.path = talloc_asprintf(mem_ctx,"%s","ADMIN$");
- r.in.ctr.subctr.ctr0 = &c0;
- r.in.ctr.subctr.ctr0->count = 0;
- r.in.ctr.subctr.ctr0->array = NULL;
+ r.in.ctr.ctr0 = &c0;
+ r.in.ctr.ctr0->count = 0;
+ r.in.ctr.ctr0->array = NULL;
r.in.preferred_len = (uint32)-1;
r.in.resume_handle = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
- r.in.ctr.level = levels[i];
- r.in.ctr.level2 = levels[i];
- printf("testing NetConnEnum level %u\n", r.in.ctr.level);
+ r.in.level = levels[i];
+ printf("testing NetConnEnum level %u\n", r.in.level);
status = dcerpc_srvsvc_NetConnEnum(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
- printf("NetConnEnum level %u failed - %s\n", r.in.ctr.level, nt_errstr(status));
+ printf("NetConnEnum level %u failed - %s\n", r.in.level, nt_errstr(status));
ret = False;
}
}
@@ -67,19 +66,18 @@ static BOOL test_NetFileEnum(struct dcerpc_pipe *p,
r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p));
r.in.path = NULL;
r.in.user = NULL;
- r.in.ctr.subctr.ctr3 = &c3;
- r.in.ctr.subctr.ctr3->count = 0;
- r.in.ctr.subctr.ctr3->array = NULL;
+ r.in.ctr.ctr3 = &c3;
+ r.in.ctr.ctr3->count = 0;
+ r.in.ctr.ctr3->array = NULL;
r.in.preferred_len = (uint32)4096;
r.in.resume_handle = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
- r.in.ctr.level = levels[i];
- r.in.ctr.level2 = levels[i];
- printf("testing NetFileEnum level %u\n", r.in.ctr.level);
+ r.in.level = levels[i];
+ printf("testing NetFileEnum level %u\n", r.in.level);
status = dcerpc_srvsvc_NetFileEnum(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
- printf("NetFileEnum level %u failed - %s\n", r.in.ctr.level, nt_errstr(status));
+ printf("NetFileEnum level %u failed - %s\n", r.in.level, nt_errstr(status));
ret = False;
}
}
@@ -100,19 +98,18 @@ static BOOL test_NetSessEnum(struct dcerpc_pipe *p,
r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p));
r.in.client = NULL;
r.in.user = NULL;
- r.in.ctr.subctr.ctr0 = &c0;
- r.in.ctr.subctr.ctr0->count = 0;
- r.in.ctr.subctr.ctr0->array = NULL;
+ r.in.ctr.ctr0 = &c0;
+ r.in.ctr.ctr0->count = 0;
+ r.in.ctr.ctr0->array = NULL;
r.in.preferred_len = (uint32)-1;
r.in.resume_handle = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
- r.in.ctr.level = levels[i];
- r.in.ctr.level2 = levels[i];
- printf("testing NetSessEnum level %u\n", r.in.ctr.level);
+ r.in.level = levels[i];
+ printf("testing NetSessEnum level %u\n", r.in.level);
status = dcerpc_srvsvc_NetSessEnum(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
- printf("NetSessEnum level %u failed - %s\n", r.in.ctr.level, nt_errstr(status));
+ printf("NetSessEnum level %u failed - %s\n", r.in.level, nt_errstr(status));
ret = False;
}
}
@@ -131,19 +128,18 @@ static BOOL test_NetShareEnumAll(struct dcerpc_pipe *p,
BOOL ret = True;
r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p));
- r.in.ctr.subctr.ctr0 = &c0;
- r.in.ctr.subctr.ctr0->count = 0;
- r.in.ctr.subctr.ctr0->array = NULL;
+ r.in.ctr.ctr0 = &c0;
+ r.in.ctr.ctr0->count = 0;
+ r.in.ctr.ctr0->array = NULL;
r.in.preferred_len = (uint32)-1;
r.in.resume_handle = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
- r.in.ctr.level = levels[i];
- r.in.ctr.level2 = levels[i];
- printf("testing NetShareEnumAll level %u\n", r.in.ctr.level);
+ r.in.level = levels[i];
+ printf("testing NetShareEnumAll level %u\n", r.in.level);
status = dcerpc_srvsvc_NetShareEnumAll(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
- printf("NetShareEnumAll level %u failed - %s\n", r.in.ctr.level, nt_errstr(status));
+ printf("NetShareEnumAll level %u failed - %s\n", r.in.level, nt_errstr(status));
ret = False;
}
}
@@ -192,19 +188,18 @@ static BOOL test_NetTransportEnum(struct dcerpc_pipe *p,
BOOL ret = True;
r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p));
- r.in.ctr.subctr.ctr0 = &c0;
- r.in.ctr.subctr.ctr0->count = 0;
- r.in.ctr.subctr.ctr0->array = NULL;
+ r.in.ctr.ctr0 = &c0;
+ r.in.ctr.ctr0->count = 0;
+ r.in.ctr.ctr0->array = NULL;
r.in.preferred_len = (uint32)-1;
r.in.resume_handle = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
- r.in.ctr.level = levels[i];
- r.in.ctr.level2 = levels[i];
- printf("testing NetTransportEnum level %u\n", r.in.ctr.level);
+ r.in.level = levels[i];
+ printf("testing NetTransportEnum level %u\n", r.in.level);
status = dcerpc_srvsvc_NetTransportEnum(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
- printf("NetTransportEnum level %u failed - %s\n", r.in.ctr.level, nt_errstr(status));
+ printf("NetTransportEnum level %u failed - %s\n", r.in.level, nt_errstr(status));
ret = False;
}
}
@@ -223,19 +218,18 @@ static BOOL test_NetShareEnum(struct dcerpc_pipe *p,
BOOL ret = True;
r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p));
- r.in.ctr.subctr.ctr0 = &c0;
- r.in.ctr.subctr.ctr0->count = 0;
- r.in.ctr.subctr.ctr0->array = NULL;
+ r.in.ctr.ctr0 = &c0;
+ r.in.ctr.ctr0->count = 0;
+ r.in.ctr.ctr0->array = NULL;
r.in.preferred_len = (uint32)-1;
r.in.resume_handle = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
- r.in.ctr.level = levels[i];
- r.in.ctr.level2 = levels[i];
- printf("testing NetShareEnum level %u\n", r.in.ctr.level);
+ r.in.level = levels[i];
+ printf("testing NetShareEnum level %u\n", r.in.level);
status = dcerpc_srvsvc_NetShareEnum(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
- printf("NetShareEnum level %u failed - %s\n", r.in.ctr.level, nt_errstr(status));
+ printf("NetShareEnum level %u failed - %s\n", r.in.level, nt_errstr(status));
ret = False;
}
}
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index 13af1184e9..9d576c2020 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -60,7 +60,7 @@ static BOOL test_TransportEnum(struct dcerpc_pipe *p,
ZERO_STRUCT(info);
ZERO_STRUCT(info_array);
- info.u.array = &info_array;
+ info.u.array = NULL;
r.in.server_name = dcerpc_server_name(p);
r.in.info = &info;