summaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
Diffstat (limited to 'nss')
-rw-r--r--nss/digits_dots.c5
-rw-r--r--nss/nss.h4
-rw-r--r--nss/nsswitch.c7
3 files changed, 7 insertions, 9 deletions
diff --git a/nss/digits_dots.c b/nss/digits_dots.c
index b86f66cf4d..c953fc6ec6 100644
--- a/nss/digits_dots.c
+++ b/nss/digits_dots.c
@@ -236,7 +236,10 @@
{
if (!*cp)
{
- if (*--cp == '.') break;
+ if (*--cp == '.')
+ break;
+ if (!strchr (name, ':'))
+ break;
/* All-IPv6-legal, no dot at the end. Fake up a
hostent as if we'd actually done a lookup. */
diff --git a/nss/nss.h b/nss/nss.h
index 8cf2565275..b36c53d05c 100644
--- a/nss/nss.h
+++ b/nss/nss.h
@@ -24,10 +24,6 @@
#define _NSS_H 1
#include <features.h>
-/* Revision number of NSS interface (must be a string). */
-#define NSS_SHLIB_REVISION __nss_shlib_revision
-extern const char *const __nss_shlib_revision;
-
__BEGIN_DECLS
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 201a2bccfe..77fc4f0916 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -65,8 +65,7 @@ __libc_lock_define_initialized (static, lock)
/* String with revision number of the shared object files. */
-const char *const __nss_shlib_revision = LIBNSS_FILES_SO + 15;
-
+static const char *const __nss_shlib_revision = LIBNSS_FILES_SO + 15;
/* The root of the whole data base. */
static name_database *service_table;
@@ -332,7 +331,7 @@ nss_lookup_function (service_user *ni, const char *fct_name)
{
/* Load the shared library. */
size_t shlen = (7 + strlen (ni->library->name) + 3
- + strlen (NSS_SHLIB_REVISION) + 1);
+ + strlen (__nss_shlib_revision) + 1);
char shlib_name[shlen];
void do_open (void)
@@ -345,7 +344,7 @@ nss_lookup_function (service_user *ni, const char *fct_name)
__stpcpy (__stpcpy (__stpcpy (__stpcpy (shlib_name, "libnss_"),
ni->library->name),
".so"),
- NSS_SHLIB_REVISION);
+ __nss_shlib_revision);
if (nss_dlerror_run (do_open) != 0)
/* Failed to load the library. */