smb2www - libsmbclient.so

Andrew Bartlett abartlet at pcug.org.au
Thu Jan 3 20:32:02 GMT 2002


Richard Sharpe wrote:
> 
> Andrew Bartlett wrote:
> 
> >As this is a part of Samba I actually want to use (the new smb2www
> >sounds *really* neat) I put some thought into how I would fix it:
> >
> >smbc_init() returns a SMBC_CTX.
> >
> Agreed.
> 
> >
> >All functions are pointers off that context, and take that context as
> >their first arg.
> >
> OK.
> 
> >
> >For backward compatibility, existing functions are replaced with new
> >functions that use a static SMBC_CTX, initilised at startup in the same
> >way the current stuff is.
> >
> OK, that should work. It would even allow programs coded to the existing
> interface to do a shutdown if they needed to. If smbc_init() is called
> twice, then does the static SMBC_CTX gets overwritten with the new one?
>  Hmmm, perhaps we need smbc_init(), like now, and then struct smbc_ctx_t
> *smbc_init2().

Yep, we need a seperate function.  Programs that don't call the static
version shouln't have the statics set at all.  And as the static buffer
will just be a pointer we can destroy it correctly as well.

> >
> >We then have the ability to sensibly do a smbc_destroy() without
> >significant pain, and programs that accidentily use the lib twice don't
> >get nasty shocks (becouse it should be up to the app to determine the
> >scope for 'magic' connection reuse, not the lib).
> >
> >This would not only solve the problem mentioned, but would make the lib
> >much more flexible.
> >
> >Other ideas I have:  I want to allow kerberos authentication via
> >libsmbclient, because I'll be using mod_auth_krb5 on my webserver, and
> >this will allow me to avoid passing passwords about :-).
> >
> I also want to extend libsmbclient. I want to provide a way to access
> all the extra bits than a Posix-like interface does not give you access to.
> 
> Having a vnode-like interface as well as the current posix-like
> interface would seem to solve that problem.

Well it sounds like the ideas are down pat - now just for that minor
detail called 'implementation' :-).  If you want a hand I might be able
to do a bit.

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net




More information about the samba-technical mailing list