Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
95615c90e2
@ -1365,13 +1365,15 @@ acc_check_port_access(acc_stanza_t *acc, char *port_str)
|
||||
"Unable to create acc_port_list from incoming data: %s",
|
||||
port_str
|
||||
);
|
||||
free_acc_port_list(in_pl);
|
||||
return(0);
|
||||
}
|
||||
strlcpy(buf, start, (ndx-start)+1);
|
||||
if(add_port_list_ent(&in_pl, buf) == 0)
|
||||
{
|
||||
log_msg(LOG_ERR, "Invalid proto/port string");
|
||||
return 0;
|
||||
free_acc_port_list(in_pl);
|
||||
return(0);
|
||||
}
|
||||
|
||||
start = ndx+1;
|
||||
@ -1386,12 +1388,14 @@ acc_check_port_access(acc_stanza_t *acc, char *port_str)
|
||||
"Unable to create acc_port_list from incoming data: %s",
|
||||
port_str
|
||||
);
|
||||
free_acc_port_list(in_pl);
|
||||
return(0);
|
||||
}
|
||||
strlcpy(buf, start, (ndx-start)+1);
|
||||
if(add_port_list_ent(&in_pl, buf) == 0)
|
||||
{
|
||||
log_msg(LOG_ERR, "Invalid proto/port string");
|
||||
free_acc_port_list(in_pl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -707,7 +707,14 @@ process_spa_request(const fko_srv_options_t * const opts,
|
||||
/* Parse and expand our access message.
|
||||
*/
|
||||
if(expand_acc_port_list(&port_list, spadat->spa_message_remain) != 1)
|
||||
{
|
||||
/* technically we would already have exited with an error if there were
|
||||
* any memory allocation errors (see the add_port_list() function), but
|
||||
* for completeness...
|
||||
*/
|
||||
free_acc_port_list(port_list);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* Start at the top of the proto-port list...
|
||||
*/
|
||||
@ -740,7 +747,7 @@ process_spa_request(const fko_srv_options_t * const opts,
|
||||
if(jump_rule_exists(IPT_INPUT_ACCESS) == 0)
|
||||
add_jump_rule(opts, IPT_INPUT_ACCESS);
|
||||
|
||||
if(out_chain->to_chain != NULL && strlen(out_chain->to_chain))
|
||||
if(strlen(out_chain->to_chain))
|
||||
{
|
||||
if(chain_exists(opts, IPT_OUTPUT_ACCESS) == 0)
|
||||
create_chain(opts, IPT_OUTPUT_ACCESS);
|
||||
@ -786,7 +793,7 @@ process_spa_request(const fko_srv_options_t * const opts,
|
||||
/* If we have to make an corresponding OUTPUT rule if out_chain target
|
||||
* is not NULL.
|
||||
*/
|
||||
if(out_chain->to_chain != NULL && strlen(out_chain->to_chain))
|
||||
if(strlen(out_chain->to_chain))
|
||||
{
|
||||
memset(rule_buf, 0, CMD_BUFSIZE);
|
||||
|
||||
@ -884,7 +891,7 @@ process_spa_request(const fko_srv_options_t * const opts,
|
||||
}
|
||||
|
||||
}
|
||||
else if(fwd_chain->to_chain != NULL && strlen(fwd_chain->to_chain))
|
||||
else if(strlen(fwd_chain->to_chain))
|
||||
{
|
||||
/* Make our FORWARD and NAT rules, and make sure the
|
||||
* required chain and jump rule exists
|
||||
@ -927,7 +934,7 @@ process_spa_request(const fko_srv_options_t * const opts,
|
||||
}
|
||||
}
|
||||
|
||||
if(dnat_chain->to_chain != NULL && strlen(dnat_chain->to_chain))
|
||||
if(strlen(dnat_chain->to_chain))
|
||||
{
|
||||
/* Make sure the required chain and jump rule exists
|
||||
*/
|
||||
|
||||
@ -188,8 +188,8 @@ get_raw_digest(char **digest, char *pkt_data)
|
||||
|
||||
*digest = strdup(tmp_digest);
|
||||
|
||||
if (digest == NULL)
|
||||
return SPA_MSG_ERROR;
|
||||
if (*digest == NULL)
|
||||
res = SPA_MSG_ERROR; /* really a strdup() memory allocation problem */
|
||||
|
||||
fko_destroy(ctx);
|
||||
ctx = NULL;
|
||||
|
||||
@ -164,7 +164,10 @@ log_msg(int level, char* msg, ...)
|
||||
va_end(apse);
|
||||
|
||||
if(LOG_STDERR_ONLY & level)
|
||||
{
|
||||
va_end(ap);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Remove the log to stderr flag from the log level value.
|
||||
*/
|
||||
|
||||
@ -5690,7 +5690,7 @@ sub file_find_regex() {
|
||||
}
|
||||
|
||||
open F, "< $file" or
|
||||
(&write_test_file("[-] Could not open $file: $!\n", $file) and return 0);
|
||||
(&write_test_file("[-] Could not open $file: $!\n", $curr_test_file) and return 0);
|
||||
while (<F>) {
|
||||
push @file_lines, $_;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user