summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/libnet/libnet_share.c5
-rw-r--r--source4/torture/rpc/srvsvc.c22
2 files changed, 16 insertions, 11 deletions
diff --git a/source4/torture/libnet/libnet_share.c b/source4/torture/libnet/libnet_share.c
index 76a29851e1..e49461357a 100644
--- a/source4/torture/libnet/libnet_share.c
+++ b/source4/torture/libnet/libnet_share.c
@@ -170,6 +170,7 @@ static bool test_addshare(struct dcerpc_pipe *svc_pipe, TALLOC_CTX *mem_ctx, con
{
NTSTATUS status;
struct srvsvc_NetShareAdd add;
+ union srvsvc_NetShareInfo info;
struct srvsvc_NetShareInfo2 i;
i.name = share;
@@ -180,9 +181,11 @@ static bool test_addshare(struct dcerpc_pipe *svc_pipe, TALLOC_CTX *mem_ctx, con
i.password = NULL;
i.permissions = 0x0;
+ info.info2 = &i;
+
add.in.server_unc = host;
add.in.level = 2;
- add.in.info.info2 = &i;
+ add.in.info = &info;
add.in.parm_error = NULL;
status = dcerpc_srvsvc_NetShareAdd(svc_pipe, mem_ctx, &add);
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index 55352278e7..b890f11ab8 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -447,6 +447,7 @@ static bool test_NetShareAddSetDel(struct torture_context *tctx,
struct srvsvc_NetShareGetInfo q;
struct srvsvc_NetShareDel d;
struct sec_desc_buf sd_buf;
+ union srvsvc_NetShareInfo info;
struct {
uint32_t level;
WERROR expected;
@@ -468,17 +469,18 @@ static bool test_NetShareAddSetDel(struct torture_context *tctx,
talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.share_name = talloc_strdup(tctx, "testshare");
+ info.info2 = talloc(tctx, struct srvsvc_NetShareInfo2);
+ info.info2->name = r.in.share_name;
+ info.info2->type = STYPE_DISKTREE;
+ info.info2->comment = talloc_strdup(tctx, "test comment");
+ info.info2->permissions = 123434566;
+ info.info2->max_users = -1;
+ info.info2->current_users = 0;
+ info.info2->path = talloc_strdup(tctx, "C:\\");
+ info.info2->password = NULL;
+
+ a.in.info = &info;
a.in.level = 2;
- a.in.info.info2 = talloc(tctx, struct srvsvc_NetShareInfo2);
- a.in.info.info2->name = r.in.share_name;
- a.in.info.info2->type = STYPE_DISKTREE;
- a.in.info.info2->comment = talloc_strdup(tctx, "test comment");
- a.in.info.info2->permissions = 123434566;
- a.in.info.info2->max_users = -1;
- a.in.info.info2->current_users = 0;
- a.in.info.info2->path = talloc_strdup(tctx, "C:\\");
- a.in.info.info2->password = NULL;
-
a.in.parm_error = NULL;
status = dcerpc_srvsvc_NetShareAdd(p, tctx, &a);