From: Vincent Bernat Date: Sat, 16 Jun 2018 15:47:14 +0000 (+0200) Subject: priv: request CAP_FOWNER only if SNMP is enabled on command-line X-Git-Tag: 1.0.2~16^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e52112d730661f04c8164dd6e4159eebd98b961;p=thirdparty%2Flldpd.git priv: request CAP_FOWNER only if SNMP is enabled on command-line --- diff --git a/src/daemon/lldpd.c b/src/daemon/lldpd.c index 2c41622d..874bc611 100644 --- a/src/daemon/lldpd.c +++ b/src/daemon/lldpd.c @@ -1827,7 +1827,7 @@ lldpd_main(int argc, char *argv[], char *envp[]) #ifdef ENABLE_PRIVSEP priv_init(PRIVSEP_CHROOT, ctl, uid, gid, #ifdef USE_SNMP - (agentx ? agentx : agent_default_agentx_socket())[0] == '/' + snmp && ((agentx ? agentx : agent_default_agentx_socket())[0] == '/') #else 0 #endif