Handle IPv6 addresses in pam arguments
Currently strtok
is used to search for the colon separating host from port, but that doesn't work for IPv6 addresses such as [::1]:1234
. Since the brackets have to be removed for getaddrinfo
anyway (I think), checking if the first byte is a [
should be easiest and reliable.
Edited by Lukas Braun