diff options
author | Tom Mortensen <tomm@lime-technology.com> | 2016-04-16 10:57:12 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2016-04-22 07:20:17 +0200 |
commit | d3569ca2711d21ac87ff539662333ad315a2a618 (patch) | |
tree | 8abcf6b54f4595eca27d6799f839bc307db3237d /nsswitch | |
parent | 2ef0c9a8d4623d88414eaaf32cdd18c6ef17900a (diff) | |
download | samba-d3569ca2711d21ac87ff539662333ad315a2a618.tar.gz |
nss_wins: ip_pton expects the raw IP address
Signed-off-by: Tom Mortensen <tomm@lime-technology.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'nsswitch')
-rw-r--r-- | nsswitch/wins.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nsswitch/wins.c b/nsswitch/wins.c index 3243ffb5bff..22524e46461 100644 --- a/nsswitch/wins.c +++ b/nsswitch/wins.c @@ -47,7 +47,7 @@ NSS_STATUS _nss_wins_gethostbyname2_r(const char *name, int af, struct hostent * static char *lookup_byname_backend(const char *name) { const char *p; - char *ip; + char *ip, *ipp; size_t nbt_len; wbcErr result; @@ -65,6 +65,11 @@ static char *lookup_byname_backend(const char *name) return NULL; } + ipp = strchr(ip, '\t'); + if (ipp != NULL) { + *ipp = '\0'; + } + return ip; } |