1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

Fix bug in writing names into gencache

as well as 2 typos where AF_INET6 was mistypes as AF_INET.
JERRY YOU NEED THESE FIXES.
Fixes smbclient -L localhost -U%
Bugs reported by Kukks (thanks kukks).
Jeremy.
(This used to be commit f109f82622)
This commit is contained in:
Jeremy Allison
2007-10-25 19:07:25 -07:00
parent 6128d116b3
commit e054affb7b
3 changed files with 6 additions and 13 deletions

View File

@ -2280,11 +2280,12 @@ static char *ipstr_list_add(char **ipstr_list, const struct ip_service *service)
return NULL;
}
print_sockaddr(addr_buf,
sizeof(addr_buf),
&service->ss);
/* attempt to convert ip to a string and append colon separator to it */
if (*ipstr_list) {
print_sockaddr(addr_buf,
sizeof(addr_buf),
&service->ss);
if (service->ss.ss_family == AF_INET) {
/* IPv4 */
asprintf(&new_ipstr, "%s%s%s:%d",