libsmbclient new options (bug #2308)

Derrell.Lipman at UnwiredUniverse.com Derrell.Lipman at UnwiredUniverse.com
Fri Mar 11 14:22:18 GMT 2005


While incorporating the patch I provided in bug #2308, Jerry added bugzilla
comment #7:

> when I build a new libsmbclient.so with these chanegs and install it
> konqueror dies accessing smb://server/share (process died unexpectedly).
> Any ideas?  The changes look ok.  I just want to make sure for myself that
> certain things don't break.

to which I replied (comment #8):

> The context structure has new options fields and is a different size.  It
> likely requires a simple recompilation of Konqueror with the new
> libsmbclient.h file to fix this problem.

Jerry's final comment (comment #9) was:

> i've applied the patch bug I moved the options struct from _SMBCCTX to the
> context->internal structure to maintain binary compatibility.  Tested with
> Konqueror.  WOrks ok.  derrel, we should probably talk about this some more
> on the samba-technical ml.  closing for now.

So I'm bringing this up again here.

The options structure is specifically intended to be manipulated by the
library user, so it does not belong in "internal".  I believe, however, that
binary compatibility can be maintained with the previous version by moving the
"options" structure to immediately before "internals" structure.  When
libsmbclient is recompiled, it will know where the new location of the
"internals" structure is.  No external users should be accessing things in
"internals" so all other addresses in previously-compiled apps should continue
to point to the right place.  (We could put "options" *after* "internals" but
that would disallow ever changing anything in "internals" and still
maintaining binary compatibility.  I recommend putting "options" just *before*
"internals".)

Jerry, should I re-open the bug with this suggestion?

Cheers,

Derrell


More information about the samba-technical mailing list