Pass 'service' instead of 'argv[1]' to servxcheck.

This commit is contained in:
Philip Homburg 2006-08-10 14:13:28 +00:00
parent 6076eddf9c
commit 82a5bffa7d

View File

@ -233,7 +233,7 @@ int main(int argc, char **argv)
/* Check if access to this service allowed. */
if (ioctl(client_fd, NWIOGTCPCONF, &tcpconf) == 0
&& tcpconf.nwtc_remaddr != tcpconf.nwtc_locaddr
&& !servxcheck(tcpconf.nwtc_remaddr, argv[1], NULL)
&& !servxcheck(tcpconf.nwtc_remaddr, service, NULL)
) {
exit(1);
}