check_include_file(grp.h HAVE_GRP_H)
check_include_file(nss.h HAVE_NSS_H)
check_include_file(nss_common.h HAVE_NSS_COMMON_H)
+check_include_file(gnu/lib-names.h HAVE_GNU_LIB_NAMES_H)
# FUNCTIONS
check_function_exists(strncpy HAVE_STRNCPY)
#cmakedefine HAVE_GRP_H 1
#cmakedefine HAVE_NSS_H 1
#cmakedefine HAVE_NSS_COMMON_H 1
+#cmakedefine HAVE_GNU_LIB_NAMES_H 1
/*************************** FUNCTIONS ***************************/
#include <search.h>
#include <assert.h>
+#ifdef HAVE_GNU_LIB_NAMES_H
+#include <gnu/lib-names.h>
+#endif
+
#include "nss_utils.h"
/*
* Defining _POSIX_PTHREAD_SEMANTICS before including pwd.h and grp.h gives us
case NWRAP_LIBNSL:
#ifdef HAVE_LIBNSL
handle = nwrap_main_global->libc->nsl_handle;
+#ifdef LIBNSL_SO
+ if (handle == NULL) {
+ handle = dlopen(LIBNSL_SO, flags);
+
+ nwrap_main_global->libc->nsl_handle = handle;
+ }
+#endif
if (handle == NULL) {
for (i = 10; i >= 0; i--) {
char soname[256] = {0};
/* FALL TROUGH */
case NWRAP_LIBC:
handle = nwrap_main_global->libc->handle;
+#ifdef LIBC_SO
+ if (handle == NULL) {
+ handle = dlopen(LIBC_SO, flags);
+
+ nwrap_main_global->libc->handle = handle;
+ }
+#endif
if (handle == NULL) {
for (i = 10; i >= 0; i--) {
char soname[256] = {0};