Can smbclient or libsmbclient do NetrShareEnum ?
mimir at samba.org
Wed Sep 8 18:41:46 GMT 2004
On Wed, Sep 08, 2004 at 11:56:34AM -0700, Richard Sharpe wrote:
> On Wed, 8 Sep 2004, Rafal Szczesniak wrote:
> > On Tue, Sep 07, 2004 at 03:38:17PM -0700, David Wuertele wrote:
> > > My app needs to query Windows hosts using the NetrShareEnum RPC. It
> > > isn't obvious from the docs whether I can accomplish this with
> > > the smbclient app or the libsmbclient.so library. Is this
> > > implemented? Where is the API documented?
> > Nowhere, actually :)
> > Yes, this function is implemented. Take a look at rpc_client/cli_srvsvc.c
> > file. Find function cli_srvsvc_net_share_enum(). That's what you're
> > looking for. Obviously, you have to learn how to properly call this
> > function, if you haven't ever done it yet (ie. establish smb session,
> > open named pipe, etc.).
> Well, it would be easier if the libsmbclient (or libsmb) code would call
> this function at the appropriate point, but it doesn't as far as I am
I believe, libsmbclient allows you to operate on smb level quite easily,
but involving rpc calls requires you to employ them just the way samba
> This will be much easier in Samba4, I suspect.
Correct, yet I didn't point at Samba4 due to its evolving nature.
Samba Team member http://www.samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20040908/a5a58649/attachment.bin
More information about the samba-technical