diff options
Diffstat (limited to 'nss/nss_files/files-service.c')
-rw-r--r-- | nss/nss_files/files-service.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/nss/nss_files/files-service.c b/nss/nss_files/files-service.c index 5dea476208..1bd26d1f07 100644 --- a/nss/nss_files/files-service.c +++ b/nss/nss_files/files-service.c @@ -40,8 +40,13 @@ LINE_PARSER #include GENERIC DB_LOOKUP (servbyname, 1 + strlen (name), (".%s", name), - LOOKUP_NAME (s_name, s_aliases), - const char *name) + { + /* Must match both protocol and name. */ + if (strcmp (result->s_proto, proto)) + continue; + LOOKUP_NAME (s_name, s_aliases) + }, + const char *name, const char *proto) DB_LOOKUP (servbyport, 20, ("=%d", port), { |