[proof of concept] libwbclient.so

Gerald (Jerry) Carter jerry at samba.org
Thu Sep 6 21:50:10 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gerald (Jerry) Carter wrote:

> One thing that did come up is the handy use of talloc().
> I thought about this and even built the libsambautil.so
> which included talloc for use by libwbclient.  But in the
> end, I felt like it was unfair to cross the API boundary
> with TALLOC_CTX* and therefore require the calling
> application to use talloc.  I love talloc, but at least for
> right now, I think it is better to stick with malloc().
> 
> This does mean that I've got to find a better way to manage
> memory in wbcLookupRids().  And we take a bit of a hit having
> to copy memory in winbind_lookup_rids().  Suggestions welcome.

One alternative that Danilo (at work) suggested is just
keeping the talloc use internal to the library and wrapping
the talloc_destroy() in a wbcFree() call.  That helps with
the library memory management but not the copying with smbd.




cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG4HYSIR7qMdg1EfYRAugPAKDJ45r6I7yxUU7O0n5TkJXszLTtLwCghw1/
IzSzxIr2mjf8Po43gLO/qA8=
=Hs/2
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list