[proof of concept] libwbclient.so

Gerald (Jerry) Carter jerry at samba.org
Thu Aug 30 15:43:27 GMT 2007


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

James,

> I like the idea. Some comments about the API ....
> 
> I don't much like having the API allocate strings for 
> all the SIDs. If you defined a binary SID type, callers
> would only have to allocate when they called wbcSidToString().

This brings up the question of whether or not to expose the SID
structure.  In an effort to maintain the LGPL status of the lib,
I stripped out most Samba data structures.  We can expose DOM_SID
and related parsing routines as long as people agree its ok.
That would make separating smbd & winbindd easier for me.

> The SUCCESS/FAIL values of wbcStatus are OK, but if you are going to
> make wbcStatus more detailed I'd suggest renaming WBC_FAIL to
> WBC_UNKNOWN_ERROR or something.

Agreed.  That was just a placeholder rather than BOOL or int
for return values.  In general though, you agree with all
functions returning a library specific error code, correct?

> I can't tell what name_type means by looking at this code, 
> but it feels like it should be an enum.

It's the lsa_SidType enum but is returned as an int in
the winbindd_response.  I agree that this should be redefined
as an enum in wbclient.h (similar reasoning to the DOM_SID
comments above).

> this API should be in nsswitch, not in winbind :)

Yeah.  Good luck getting the NSS API changed. :-)





cheers, jerry
- --
=====================================================================
Samba                                    ------- http://www.samba.org
Centeris                         -----------  http://www.centeris.com
"What man is a man who does not make the world better?"      --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG1uWfIR7qMdg1EfYRAoyMAKDtPlZGe/PEyL38pMdJ71gFRdFgJwCeJyUk
5vBgLBdetIB3VK8v43kHruk=
=Oui3
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list