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

Re: [patches] Patch for OPTION_EGLIBC_NSSWITCH option group.



Jim Blandy wrote:
> Here's a patch that implements the OPTION_EGLIBC_NSSWITCH option
> group.  There's one nit I want to clean up (the use of fixed-size
> arrays for service and database names in nss/nsswitch.h), but this is
> basically how it would be.
> 
> The documentation, copied from option-groups.def:
> 

... Thanks!

> +       In this arrangement, EGLIBC will not use the 'dlopen' and
> +       'dlsym' functions to find database access functions.  Instead,
> +       libc hard-codes references to the service libraries' database
> +       access functions.  You must explicitly link your program
> +       against the name service libraries (those whose names start
> +       with 'libnss_', in the sysroot's '/lib' directory) whose
> +       functions you intend to use.  This arrangement helps
> +       system-wide static analysis tools decide which functions a
> +       system actually uses.
> +
> +       Note that some nsswitch service libraries require other option
> +       groups to be enabled; for example, the OPTION_EGLIBC_INET
> +       option group must be enabled to use the 'libnss_dns.so.2' or
> +       'libnss_nis.so.2' service libraries, which use the Domain Name
> +       System and Network Information Service network protocols to
> +       answer queries.

Would it work to include the default (compiled in?) name service
libraries in the libc.so linker script?

I'm just trying to think of an automated way to include the libnss
libraries w/o having to modify the applications.

--Mark