diff --git a/src/detect-parse.c b/src/detect-parse.c index 42450dd1ea..1f55ee6b1a 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -534,7 +534,7 @@ int SigParsePort(Signature *s, const char *portstr, char flag) /** \retval 1 valid * \retval 0 invalid */ -static int SigParseActionRejectValidate(void) { +static int SigParseActionRejectValidate(const char *action) { #ifdef HAVE_LIBNET11 #ifdef HAVE_LIBCAP_NG if (sc_set_caps == TRUE) { @@ -575,22 +575,22 @@ int SigParseAction(Signature *s, const char *action) { s->action = ACTION_PASS; return 0; } else if (strcasecmp(action, "reject") == 0) { - if (!(SigParseActionRejectValidate())) + if (!(SigParseActionRejectValidate(action))) return -1; s->action = ACTION_REJECT; return 0; } else if (strcasecmp(action, "rejectsrc") == 0) { - if (!(SigParseActionRejectValidate())) + if (!(SigParseActionRejectValidate(action))) return -1; s->action = ACTION_REJECT; return 0; } else if (strcasecmp(action, "rejectdst") == 0) { - if (!(SigParseActionRejectValidate())) + if (!(SigParseActionRejectValidate(action))) return -1; s->action = ACTION_REJECT_DST; return 0; } else if (strcasecmp(action, "rejectboth") == 0) { - if (!(SigParseActionRejectValidate())) + if (!(SigParseActionRejectValidate(action))) return -1; s->action = ACTION_REJECT_BOTH; return 0; diff --git a/src/suricata.c b/src/suricata.c index 11efd072b5..27c8fa64e6 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -889,7 +889,6 @@ int main(int argc, char **argv) SignalHandlerSetup(SIGINT, SignalHandlerSigint); SignalHandlerSetup(SIGTERM, SignalHandlerSigterm); SignalHandlerSetup(SIGHUP, SignalHandlerSighup); -#endif /* OS_WIN32 */ /* Get the suricata user ID to given user ID */ if (do_setuid == TRUE) { @@ -908,6 +907,7 @@ int main(int argc, char **argv) sc_set_caps = TRUE; } +#endif /* OS_WIN32 */ /* pre allocate packets */ SCLogDebug("preallocating packets... packet size %" PRIuMAX "", (uintmax_t)sizeof(Packet)); diff --git a/src/util-privs.c b/src/util-privs.c index 83b9ddf696..42c48c2f30 100644 --- a/src/util-privs.c +++ b/src/util-privs.c @@ -24,6 +24,8 @@ * Steve Grubb */ +#ifndef OS_WIN32 + #include #include #include "util-debug.h" @@ -219,3 +221,4 @@ int SCGetGroupID(char *group_name, uint32_t *gid) return 0; } +#endif /* OS_WIN32 */