is

Stefan (metze) Metzmacher metze at samba.org
Thu Sep 9 06:01:07 GMT 2004


>>> > 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 :)
>
> Richard> Well, it would be easier if the libsmbclient (or libsmb) code
> Richard> would call this function at the appropriate point, but it
> Richard> doesn't as far as I am aware.
>
> I notice that the "net" program has an interface to NetrShareEnum.
> I've been playing with it, and it works, sorta.
>
> It seems like share names are getting clipped by the net program to 8
> bytes, but I haven't figured out where or why.
>
> Currently the rpc_client code that the net program links to is only
> output as a statically linkable object (libmsrpc.a).  Will this ever
> be dynamic?

Hi David,

I'm not sure if libmsrpc.a is build by default in samba3, and if you want a
libmsrpc.so just change the Makefile.in ( look at how libsmbclient.a and
libsmbclient.so are created)

that should do the job for you...

>
> Richard> This will be much easier in Samba4, I suspect.
>
> As far as incorporating the NetrShareEnum RPC into my own program in
> the shortest time possible, should I try to use the code in libmsrpc,
> or should I try to get Samba4 and use it?

samba4 have the stuff you need, but it currently doesn't create a shared
library, and the interfaces maybe change in few details, and it when I add
the build of a shared and static lib, it will only have non changing
interfaces from version >= 1.0.0

but if you want a quick hack that doesn't care about stable interfaces
samba 4 could do a good job for you...

--
metze

Stefan Metzmacher <metze at samba dot org>


More information about the samba-technical mailing list