]> git.ipfire.org Git - thirdparty/suricata.git/commit
init: Fix dropping privileges in nflog runmode 4531/head
authorTimo Sigurdsson <public_timo.s@silentcreek.de>
Mon, 3 Feb 2020 22:17:17 +0000 (23:17 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 7 Feb 2020 15:08:00 +0000 (16:08 +0100)
commit1262ecbde0c2130f3fd4ca336cd2646828de9391
tree5625e39fef5b14d705e146f27582c2c504b0085e
parent7810f22413812d60e9503846aa1a5eebdb86c552
init: Fix dropping privileges in nflog runmode

Using the run-as configuration option with the nflog capture method
results in the following error during the startup of suricata:
[ERRCODE: SC_ERR_NFLOG_BIND(248)] - nflog_bind_pf() for AF_INET failed

This is because SCDropMainThreadCaps does not have any capabilities
defined for the nflog runmode (unlike other runmodes). Therefore, apply
the same capabilities to the nflog runmode that are already defined for
the nfqueue runmode. This has been confirmed to allow suricata start
and drop its privileges in the nflog runmode.

Fixes redmine issue #3265.

Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de>
src/util-privs.c