summaryrefslogtreecommitdiff
path: root/source4/client
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/client
parent947e14adae7c858650789274c9761227eb1dd87c (diff)
downloadsamba-7204deac821289bbf901bf4f82a8965506669020.tar.gz
samba-7204deac821289bbf901bf4f82a8965506669020.tar.bz2
samba-7204deac821289bbf901bf4f82a8965506669020.zip
s4-srvsvc: merge srvsvc_NetShareEnumAll from s3 idl.
Guenther
Diffstat (limited to 'source4/client')
-rw-r--r--source4/client/client.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index 56b923974b..7eb14a2ce1 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -2563,9 +2563,11 @@ static bool browse_host(struct loadparm_context *lp_ctx,
char *binding;
NTSTATUS status;
struct srvsvc_NetShareEnumAll r;
+ struct srvsvc_NetShareInfoCtr info_ctr;
uint32_t resume_handle = 0;
TALLOC_CTX *mem_ctx = talloc_init("browse_host");
struct srvsvc_NetShareCtr1 ctr1;
+ uint32_t totalentries = 0;
binding = talloc_asprintf(mem_ctx, "ncacn_np:%s", query_host);
@@ -2580,11 +2582,16 @@ static bool browse_host(struct loadparm_context *lp_ctx,
return false;
}
+ info_ctr.level = 1;
+ info_ctr.ctr.ctr1 = &ctr1;
+
r.in.server_unc = talloc_asprintf(mem_ctx,"\\\\%s",dcerpc_server_name(p));
- r.in.level = 1;
- r.in.ctr.ctr1 = &ctr1;
+ r.in.info_ctr = &info_ctr;
r.in.max_buffer = ~0;
r.in.resume_handle = &resume_handle;
+ r.out.resume_handle = &resume_handle;
+ r.out.totalentries = &totalentries;
+ r.out.info_ctr = &info_ctr;
d_printf("\n\tSharename Type Comment\n");
d_printf("\t--------- ---- -------\n");
@@ -2596,9 +2603,9 @@ static bool browse_host(struct loadparm_context *lp_ctx,
if (NT_STATUS_IS_OK(status) &&
(W_ERROR_EQUAL(r.out.result, WERR_MORE_DATA) ||
W_ERROR_IS_OK(r.out.result)) &&
- r.out.ctr.ctr1) {
- display_share_result(r.out.ctr.ctr1);
- resume_handle += r.out.ctr.ctr1->count;
+ r.out.info_ctr->ctr.ctr1) {
+ display_share_result(r.out.info_ctr->ctr.ctr1);
+ resume_handle += r.out.info_ctr->ctr.ctr1->count;
}
} while (NT_STATUS_IS_OK(status) && W_ERROR_EQUAL(r.out.result, WERR_MORE_DATA));