1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

nss: Directly load nss_dns, without going through dlsym/dlopen

This partially fixes static-only NSS support (bug 27959): The dns
module no longer needs dlopen.  Support for disabling dlopen altogher
remains to be added.

This commit introduces module_load_builtin into nss/nss_module.c, which
handles the common parts of loading the built-in nss_files and nss_dns
modules.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Florian Weimer
2021-07-19 07:55:27 +02:00
parent e1fcf21474
commit ee5ed99922
6 changed files with 105 additions and 33 deletions

View File

@@ -33,10 +33,16 @@ struct nss_module_functions
#include "function.def"
};
/* Number of elements of the nss_module_functions_untyped array. */
enum
{
nss_module_functions_count = (sizeof (struct nss_module_functions)
/ sizeof (void *))
};
/* Untyped version of struct nss_module_functions, for consistent
processing purposes. */
typedef void *nss_module_functions_untyped[sizeof (struct nss_module_functions)
/ sizeof (void *)];
typedef void *nss_module_functions_untyped[nss_module_functions_count];
/* Locate the nss_files functions, as if by dlopen/dlsym. */
void __nss_files_functions (nss_module_functions_untyped pointers)