summaryrefslogtreecommitdiffstats
path: root/source4/libnet
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-30 18:02:40 +0100
committerGünther Deschner <gd@samba.org>2008-10-31 02:44:34 +0100
commit7204deac821289bbf901bf4f82a8965506669020 (patch)
treeb6e686d53edd56799e0dde6e185eb659e7fbe963 /source4/libnet
parent947e14adae7c858650789274c9761227eb1dd87c (diff)
downloadsamba-7204deac821289bbf901bf4f82a8965506669020.tar.gz
samba-7204deac821289bbf901bf4f82a8965506669020.tar.xz
samba-7204deac821289bbf901bf4f82a8965506669020.zip
s4-srvsvc: merge srvsvc_NetShareEnumAll from s3 idl.
Guenther
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_share.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/source4/libnet/libnet_share.c b/source4/libnet/libnet_share.c
index 5affb27ead..0bf6749a9c 100644
--- a/source4/libnet/libnet_share.c
+++ b/source4/libnet/libnet_share.c
@@ -28,7 +28,9 @@ NTSTATUS libnet_ListShares(struct libnet_context *ctx,
NTSTATUS status;
struct libnet_RpcConnect c;
struct srvsvc_NetShareEnumAll s;
+ struct srvsvc_NetShareInfoCtr info_ctr;
uint32_t resume_handle = 0;
+ uint32_t totalentries = 0;
struct srvsvc_NetShareCtr0 ctr0;
struct srvsvc_NetShareCtr1 ctr1;
struct srvsvc_NetShareCtr2 ctr2;
@@ -51,37 +53,39 @@ NTSTATUS libnet_ListShares(struct libnet_context *ctx,
return status;
}
- s.in.level = r->in.level;
- switch (s.in.level) {
+ info_ctr.level = r->in.level;
+ switch (info_ctr.level) {
case 0:
- s.in.ctr.ctr0 = &ctr0;
+ info_ctr.ctr.ctr0 = &ctr0;
ZERO_STRUCT(ctr0);
break;
case 1:
- s.in.ctr.ctr1 = &ctr1;
+ info_ctr.ctr.ctr1 = &ctr1;
ZERO_STRUCT(ctr1);
break;
case 2:
- s.in.ctr.ctr2 = &ctr2;
+ info_ctr.ctr.ctr2 = &ctr2;
ZERO_STRUCT(ctr2);
break;
case 501:
- s.in.ctr.ctr501 = &ctr501;
+ info_ctr.ctr.ctr501 = &ctr501;
ZERO_STRUCT(ctr501);
break;
case 502:
- s.in.ctr.ctr502 = &ctr502;
+ info_ctr.ctr.ctr502 = &ctr502;
ZERO_STRUCT(ctr502);
break;
default:
r->out.error_string = talloc_asprintf(mem_ctx,
"libnet_ListShares: Invalid info level requested: %d",
- s.in.level);
+ info_ctr.level);
return NT_STATUS_INVALID_PARAMETER;
}
s.in.max_buffer = ~0;
s.in.resume_handle = &resume_handle;
-
+ s.in.info_ctr = &info_ctr;
+ s.out.info_ctr = &info_ctr;
+ s.out.totalentries = &totalentries;
status = dcerpc_srvsvc_NetShareEnumAll(c.out.dcerpc_pipe, mem_ctx, &s);
@@ -100,7 +104,7 @@ NTSTATUS libnet_ListShares(struct libnet_context *ctx,
goto disconnect;
}
- r->out.ctr = s.out.ctr;
+ r->out.ctr = s.out.info_ctr->ctr;
disconnect:
talloc_free(c.out.dcerpc_pipe);