SMB Client with Perl module

John E. Malmberg wb8tyw at qsl.net
Wed Nov 15 23:47:41 GMT 2000


"Gerald Carter" <gcarter at valinux.company> wrote:
> Alain & Estelle BARBET wrote:
> >
> > After read several demand on comp.lang.perl.modules, I
> > want make module to access SMB share disk. I found
> > on samba.org a good start. I will add parameter and a
> > OO interface.
> >
> > First I think use perlxs, but I see that samba didn't use
> > any shared librarie. All is hard linked in executables. So
> > I can't use this method without include all source of Samba
> > :-( So I will parse output of smbclient.
> >
> > What do you think of this ?
>
> I would stay tuned.  :-)  We are ironically in the process
> of experiementing with some shared library support in various
> places.  Any I have spoken with a couple other people about
> the modularization of code.

The OpenVMS port of SAMBA 2.0.6 has the following libraries built as shared
libraries.

UBIQX

LIB (includes PARAM)

LIBSMB
    Automatically loads in the LIB shared library if it is not already
loaded.

RPC_PARSE
    Automatically loads in the LIB and LIBSMB shared libraries.

PASSDB
    Automatically loads in the LIB and LIBSMB shared libraries.

RPC_CLIENT
    Automatically loads in the LIB, LIBSMB, PASSDB, and RPC_PARSE shared
libraries.

PRINTING
    Automatically loads in the LIB shared library.


These libraries are statically linked as shared, but there is no restriction
on loading them dynamically if a program chose to do so.

> btw...I think this is a good idea :-)  Ever better is to wrap
> the client side RPC calls into an administrative module
> for handlind remote NT clients from your UNIX host.

I am not aware of any document that explains how to use any of these shared
libraries by other than the SAMBA program.  Such would be nice to have.

Also the number of entry points and global symbols can vary based on the
CONFIG.H options selected.

For these shared libraries to be of use outside of the SAMBA programs, the
interface must become publicly defined, and the same global symbols and
entry points must exist regardless of the build options.  That of course is
under the control of the core SAMBA team.

I broke it up that way on my own because it cut the build time for testing
modules on my slow VAX by a considerable amount.  A full compile and build
of SAMBA 2.0.6 on a MicroVAX 3500 takes almost 48 hours.  On my 150 Mhz
Alpha, it takes about 10 hours for a complete build from sources.

With these shared libraries, the incremental build time to test a module is
in the minutes.

-John
wb8tyw at qsl.network






More information about the samba-technical mailing list