static void http_post_select(fd_set *rfds, __a_unused fd_set *wfds)
{
- int ret, fd, match;
+ int ret, fd;
struct sender_client *sc, *tmp;
struct private_http_sender_data *phsd;
ret = mark_fd_nonblocking(fd);
if (ret < 0)
goto err_out;
- match = acl_lookup(fd, &http_acl);
- PARA_DEBUG_LOG("acl lookup returned %d\n", match);
- ret = -E_ACL_PERM;
- if ((match && !conf.http_default_deny_given) ||
- (!match && conf.http_default_deny_given))
+ ret = acl_check_access(fd, &http_acl, conf.http_default_deny_given);
+ if (ret < 0)
goto err_out;
numclients++;
sc = para_calloc(sizeof(*sc));
static int http_com_deny(struct sender_command_data *scd)
{
- if (conf.http_default_deny_given)
- acl_del_entry(&http_acl, scd->addr, scd->netmask);
- else
- acl_add_entry(&http_acl, scd->addr, scd->netmask);
+ acl_deny(scd->addr, scd->netmask, &http_acl,
+ conf.http_default_deny_given);
return 1;
}
static int http_com_allow(struct sender_command_data *scd)
{
- if (conf.http_default_deny_given)
- acl_add_entry(&http_acl, scd->addr, scd->netmask);
- else
- acl_del_entry(&http_acl, scd->addr, scd->netmask);
+ acl_allow(scd->addr, scd->netmask, &http_acl,
+ conf.http_default_deny_given);
return 1;
}