RSS feed

Re: Erros Compiling nss-pam-ldapd on Solaris 10/x86

[Date Prev][Date Next] [Thread Prev][Thread Next]

Re: Erros Compiling nss-pam-ldapd on Solaris 10/x86

Please find my comments below.

On Sep 29, 2010, at 2:52 PM, Arthur de Jong wrote:

> I've trimmed down ldap-nss.h to the things we actually use from it and
> have cleaned out some more files. Also, I want to see if I can make the
> changes easier to read. Perhaps work it a little toward the solution
> that FreeBSD uses [1].

We are all for a more readable code design.

> Since the _nss_ldap_*_r() functions aren't exported by that name anyway
> perhaps it isn't needed to rename them to _nss_nslcd_*_r()? Another
> solution would be to rework the NSS_BY* and NSS_{SET,GET,END}ENT marcos
> so they can be easily fitted inside the functions with just the 
>  nss_status_t _nss_ldap_*_r(nss_backend_t *be,void *args)
> signature.

My idea is to divide the code into two layers: the lower layer is the NSLCD 
code which is universal across all platforms; while the upper layer provides 
the platform-specific interface to the libc front-end.

The lower-layer routines are prefixed _nss_nslcd_..., while the upper layer 
For existing Linux code, the _nss_nslcd and _nss_ldap routines coincide with 
each other. The latter prefix was used/left as is.

> Having something like:
> could perhaps also work. I would rather have some of those flavour
> blocks at the end of each nss file than those ifdefs scattered
> throughout the module.

The ifdefs are there because the existing Linux code does not separate into the 
aforementioned two-layer design. I tried not to touch the existing Linux code 
as best as I can, using the ifdefs. 

In the two-layer code design, the #ifdef NSS_FLAVOR_xxx would surround the 
_nss_ldap_ routines that are platform-specific. 

> Anyway, attached is a patch against SVN r1227 of the merging work I've
> done so far. Please let me know if I terribly broke anything already. It
> currently doesn't correctly compile on Linux though (I think the linker
> is called with incorrect options).

The Solaris port needs to use the native linker, while Linux not.

> I'm going to continue with cleaning things up (I want to get rid of
> ldap-nss.h altogether) and perhaps working it towards the clearer
> separation of libc-specific hooks.
> Perhaps I should create a branch in SVN with this code. I can provide
> you with commit access if you like so perhaps we can work on it together
> if you like. What do you think?

Sounds a good idea to create a separate branch before the code stabilizes.

I am more than willing to assist wherever I can.

Ted C. Cheng

To unsubscribe send an email to or see