diff options
author | jimb <jimb@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2007-07-13 18:29:54 +0000 |
---|---|---|
committer | jimb <jimb@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2007-07-13 18:29:54 +0000 |
commit | 1decd60e6634c6092519d58acacb9475cd498f9f (patch) | |
tree | 116e8d0ad6f7f88a951184ecd0297ebf4f1f4909 /libc/option-groups.def | |
parent | b6a246fa0e6117a98a0d0486543921550a25cf86 (diff) | |
download | eglibc2-1decd60e6634c6092519d58acacb9475cd498f9f.tar.gz |
Implement the OPTION_EGLIBC_NSSWITCH option group.
* option-groups.def (OPTION_EGLIBC_NSSWITCH): New entry.
* option-groups.defaults (OPTION_EGLIBC_NSSWITCH): Initialize.
* nss/fixed-nsswitch.conf, nss/fixed-nsswitch.functions: Sample
configuration files.
* nss/nsswitch.h (service_user): Change the known function table
to a union, with appropriate types for tsearch and for fixed
nsswitch. Make the name a pointer.
(name_database_entry): Make the name a pointer.
* nss/nsswitch.c (nss_parse_file, nss_getline)
(nss_parse_service_list, nss_new_service, databases, ndatabases)
(lock, lock_nsswitch, unlock_nsswitch)
(__nss_shlib_revision, service_table):
If OPTION_EGLIBC_NSSWITCH is disabled, include statically
generated configuration data; remove code for parsing the
configuration file and reconfiguring individual databases
dynamically; initialize database and service name pointers;
simplify functions for looking up databases and query functions;
avoid locking and freeing, since no data changes at runtime.
* nss/gen-fixed-nsswitch.c: New program.
* nss/Makefile (before-compile, generated): Generate
fixed-nsswitch.h.
($(objfix)fixed-nsswitch.h, $(objpfx)gen-fixed-nsswitch)
(gen-fixed-nsswitch-CFLAGS): Rules for generating
fixed-nsswitch.h.
(CFLAGS-nsswitch.c): Define OPTION_EGLIBC_NSSWITCH as appropriate.
git-svn-id: svn://svn.eglibc.org/trunk@2816 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/option-groups.def')
-rw-r--r-- | libc/option-groups.def | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/libc/option-groups.def b/libc/option-groups.def index 3a7a1af3a..46acf60b6 100644 --- a/libc/option-groups.def +++ b/libc/option-groups.def @@ -288,6 +288,78 @@ config OPTION_EGLIBC_LOCALE_CODE group; if you disable OPTION_EGLIBC_LOCALE_CODE, you must also disable OPTION_EGLIBC_CATGETS. +config OPTION_EGLIBC_NSSWITCH + bool "Name service switch (nsswitch) support" + help + + This option group includes support for the 'nsswitch' facility. + With this option group enabled, all EGLIBC functions for + accessing various system databases (passwords and groups; + networking; aliases; public keys; and so on) consult the + '/etc/nsswitch.conf' configuration file to decide how to handle + queries. + + With this option group disabled, EGLIBC uses a fixed list of + services to satisfy queries on each database, as requested by + configuration files specified when EGLIBC is built. Your + 'option-groups.config' file must set the following two + variables: + + OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG + + Set this to the name of a file whose contents observe the + same syntax as an ordinary '/etc/nsswitch.conf' file. The + EGLIBC build process parses this file just as EGLIBC would + at run time if OPTION_EGLIBC_NSSWITCH were enabled, and + produces a C library that uses the nsswitch service + libraries to search for database entries as this file + specifies, instead of consulting '/etc/nsswitch.conf' at run + time. + + This should be a relative file name; EGLIBC will look for it + in the top build directory, along with the + 'option-groups.config' file. + + The EGLIBC source tree includes a sample configuration file + named 'nss/fixed-nsswitch.conf'; for simple configurations, + you will probably want to delete references to databases not + needed on your system. + + OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS + + The EGLIBC build process uses this file to decide which + functions to make available from which service libraries. + The file 'nss/fixed-nsswitch.functions' serves as a sample + configuration file for this setting, and explains its syntax + and meaning in more detail. + + This should be a relative file name; EGLIBC will look for it + in the top build directory, along with the + 'option-groups.config' file. + + Be sure to mention each function in each service you wish to + use. If you do not mention a service's function here, the + EGLIBC database access functions will not find it, even if + it is listed in the OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG + file. + + 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. + config OPTION_POSIX_REGEXP bool "Regular expressions" help |