Fixing the cli_initialize() interface.

derrell at samba.org derrell at samba.org
Sat May 27 17:44:37 GMT 2006


Jeremy Allison <jra at samba.org> writes:

> Derrell, will this cause you problems in
> libsmbclient maintaining binary compatibility ?
> I don't think so although you are a stack user
> of cli_initialize() - just in one place, this
> will need to be fixed.

Jeremy, I can't find any problems with binary compatibility for those users
who properly restricted themselves to the published interfaces.  My only real
concern is with the cache.  We provide an "internal cache", but users are
allowed to provide their own (external) cache to use instead of the internal
cache.  As long as their external cache functions don't include
libsmb_internal.h or make assumptions about the actual contents of the
(opaque) handle, there's no problem.  The internal cache does assume access to
the internal structures declared in libsmb_internal.h, though, so if users
with an external cache used the internal cache as a model and dereference the
handle (opaque to them but not to the internal cache), they'll have problems.

I don't suspect there's a big issue.  Anyone sufficiently intimately familiar
with the code to have created their own cache with access to internal
structures isn't likely caring too much about binary compatibility.  (In fact,
they may even have to make source code mods following your proposed changes if
they are dereferencing that handle.)

Cheers,

Derrell

ps. Let me know if you want me to make the changes to libsmbclient or if
you're just going to be doing it globally.


More information about the samba-technical mailing list