#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};
return false;
}
*p = '\0';
+#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
+ /*
+ * We don't support pw_class, so just let it point to
+ * an '\0' byte (empty string).
+ */
+ pw->pw_class = p;
+#endif /* HAVE_STRUCT_PASSWD_PW_CLASS */
p++;
e = NULL;
pw->pw_gid = (gid_t)strtoul(c, &e, 10);
NWRAP_LOG(NWRAP_LOG_TRACE, "gid[%u]\n", pw->pw_gid);
#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
- pw->pw_class = discard_const_p(char, "");
-
NWRAP_LOG(NWRAP_LOG_TRACE, "class[%s]", pw->pw_class);
#endif /* HAVE_STRUCT_PASSWD_PW_CLASS */
}
SAFE_FREE(nwrap_gr_global.list);
- nwrap_pw_global.num = 0;
+ nwrap_gr_global.num = 0;
}
#if defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM)
import os
-VERSION="1.1.15"
+VERSION="1.1.16"
def configure(conf):
if conf.CHECK_NSS_WRAPPER():
libnss_wrapper_so_path = 'libnss_wrapper.so'
else:
conf.CHECK_HEADERS('nss.h')
+ conf.CHECK_HEADERS('gnu/lib-names.h')
if conf.CONFIG_SET("HAVE___THREAD"):
conf.DEFINE("HAVE_GCC_THREAD_LOCAL_STORAGE", 1)