diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-12-19 03:31:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:30 -0500 |
commit | 8fe7d2974ca1c5e73177560a5138f73ae42bb66a (patch) | |
tree | 6585e15bd39c43558ad8e342a7d33fec66e23037 /source4/ntvfs | |
parent | dfb402e4a1d809e07f156c8050f079500018ba6c (diff) | |
download | samba-8fe7d2974ca1c5e73177560a5138f73ae42bb66a.tar.gz samba-8fe7d2974ca1c5e73177560a5138f73ae42bb66a.tar.bz2 samba-8fe7d2974ca1c5e73177560a5138f73ae42bb66a.zip |
r4274: make the prototype RAP netshareenum call return something a bit more sensible.
(This used to be commit b2e29756c2084f11d841d027e7d32952daae18d0)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/ipc/rap_server.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/source4/ntvfs/ipc/rap_server.c b/source4/ntvfs/ipc/rap_server.c index 70b65442ff..0e6c18ca3b 100644 --- a/source4/ntvfs/ipc/rap_server.c +++ b/source4/ntvfs/ipc/rap_server.c @@ -28,20 +28,21 @@ NTSTATUS rap_netshareenum(struct smbsrv_request *req, struct rap_NetShareEnum *r) { + int i; r->out.status = 0; - r->out.available = 2; + r->out.available = dcesrv_common_get_count_of_shares(req, NULL); r->out.info = talloc_array_p(req, - union rap_shareenum_info, 2); + union rap_shareenum_info, r->out.available); - strncpy(r->out.info[0].info1.name, "C$", sizeof(r->out.info[0].info1.name)); - r->out.info[0].info1.pad = 0; - r->out.info[0].info1.type = 0; - r->out.info[0].info1.comment = talloc_strdup(req, "Bla"); - - strncpy(r->out.info[1].info1.name, "IPC$", sizeof(r->out.info[0].info1.name)); - r->out.info[1].info1.pad = 0; - r->out.info[1].info1.type = 1; - r->out.info[1].info1.comment = talloc_strdup(req, "Blub"); + for (i=0;i<r->out.available;i++) { + strncpy(r->out.info[i].info1.name, + dcesrv_common_get_share_name(req, NULL, i), + sizeof(r->out.info[0].info1.name)); + r->out.info[i].info1.pad = 0; + r->out.info[i].info1.type = dcesrv_common_get_share_type(req, NULL, i); + r->out.info[i].info1.comment = talloc_strdup(req, + dcesrv_common_get_share_comment(req, NULL, i)); + } return NT_STATUS_OK; } |