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.max_buffer = (uint32)-1;
r.in.resume_handle = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
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.max_buffer = (uint32)4096;
r.in.resume_handle = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
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.max_buffer = (uint32)-1;
r.in.resume_handle = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
}
static BOOL test_NetShareEnumAll(struct dcerpc_pipe *p,
- TALLOC_CTX *mem_ctx)
+ TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
struct srvsvc_NetShareEnumAll r;
struct srvsvc_NetShareCtr0 c0;
- uint32 levels[] = {0, 1, 2, 501, 502};
+ uint32 levels[] = {0, 1, 2, 501, 502, 1004};
int i;
BOOL ret = True;
+ uint32 resume_handle;
+
+ ZERO_STRUCT(c0);
r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p));
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;
+ r.in.max_buffer = (uint32)-1;
+ r.in.resume_handle = &resume_handle;
+ r.out.resume_handle = &resume_handle;
for (i=0;i<ARRAY_SIZE(levels);i++) {
+ resume_handle = 0;
r.in.level = levels[i];
printf("testing NetShareEnumAll level %u\n", r.in.level);
status = dcerpc_srvsvc_NetShareEnumAll(p, mem_ctx, &r);
return True;
}
-#if 0
+
static BOOL test_NetDiskEnum(struct dcerpc_pipe *p,
TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
struct srvsvc_NetDiskEnum r;
- struct srvsvc_NetDiskCtr0 c0;
- uint32 levels[] = {0, 1, 2, 3};
+ uint32 levels[] = {0};
int i;
BOOL ret = True;
+ uint32 resume_handle=0;
- r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p));
- r.in.preferred_len = (uint32)-1;
- r.in.resume_handle = NULL;
+ r.in.server_unc = NULL;
+ r.in.unknown = 0;
+ r.in.resume_handle = &resume_handle;
+ r.in.ctr.ctr0 = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
r.in.level = levels[i];
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.max_buffer = (uint32)-1;
r.in.resume_handle = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
return True;
}
-#endif
+
static BOOL test_NetShareEnum(struct dcerpc_pipe *p,
TALLOC_CTX *mem_ctx)
{
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.max_buffer = (uint32)-1;
r.in.resume_handle = NULL;
for (i=0;i<ARRAY_SIZE(levels);i++) {
return False;
}
- p->flags |= DCERPC_DEBUG_PRINT_BOTH;
-
if (!test_NetConnEnum(p, mem_ctx)) {
ret = False;
}
if (!test_NetShareEnumAll(p, mem_ctx)) {
ret = False;
}
-#if 0
+
if (!test_NetDiskEnum(p, mem_ctx)) {
ret = False;
}
if (!test_NetTransportEnum(p, mem_ctx)) {
ret = False;
}
-#endif
+
if (!test_NetShareEnum(p, mem_ctx)) {
ret = False;
}
+ talloc_destroy(mem_ctx);
+
torture_rpc_close(p);
return ret;