1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

nss: Access nss_files through direct references

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

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Florian Weimer
2021-07-07 18:33:52 +02:00
parent 6212bb67f4
commit f9c8b11ed7
20 changed files with 114 additions and 32 deletions

View File

@@ -26,8 +26,6 @@
#include <alloc_buffer.h>
#include <nss.h>
NSS_DECLARE_MODULE_FUNCTIONS (files)
/* Get implementation for some internal functions. */
#include "../resolv/res_hconf.h"
@@ -358,6 +356,7 @@ _nss_files_gethostbyname3_r (const char *name, int af, struct hostent *result,
return status;
}
libc_hidden_def (_nss_files_gethostbyname3_r)
enum nss_status
_nss_files_gethostbyname_r (const char *name, struct hostent *result,
@@ -367,6 +366,7 @@ _nss_files_gethostbyname_r (const char *name, struct hostent *result,
return _nss_files_gethostbyname3_r (name, AF_INET, result, buffer, buflen,
errnop, herrnop, NULL, NULL);
}
libc_hidden_def (_nss_files_gethostbyname_r)
enum nss_status
_nss_files_gethostbyname2_r (const char *name, int af, struct hostent *result,
@@ -376,6 +376,7 @@ _nss_files_gethostbyname2_r (const char *name, int af, struct hostent *result,
return _nss_files_gethostbyname3_r (name, af, result, buffer, buflen,
errnop, herrnop, NULL, NULL);
}
libc_hidden_def (_nss_files_gethostbyname2_r)
enum nss_status
_nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
@@ -491,3 +492,4 @@ _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
return status;
}
libc_hidden_def (_nss_files_gethostbyname4_r)