optimize acl_valid_unix API in acl_valid_hostname.c

This commit is contained in:
zsx 2018-09-17 18:59:25 +08:00
parent de4805a6c8
commit 5177e4f43e

View File

@ -103,6 +103,9 @@ int acl_valid_hostname(const char *name, int gripe)
int acl_valid_unix(const char *addr)
{
if (strchr(addr, '/') != NULL)
return 1;
return !acl_valid_hostaddr(addr, 0);
}