]> git.proxmox.com Git - mirror_ovs.git/commit
rhel: don't drop capabilities when running as root
authorAaron Conole <aconole@redhat.com>
Tue, 13 Feb 2018 21:42:16 +0000 (16:42 -0500)
committerRussell Bryant <russell@ovn.org>
Tue, 27 Mar 2018 21:30:00 +0000 (17:30 -0400)
commit4299145c10953b5ba125ba2a95caa18e554f3f85
tree09090deb029774757b63ee0ec561e54e8e356505
parent1b1d2e6daa563cc91f974ffdc082fb3a8b424801
rhel: don't drop capabilities when running as root

Currently, regardless of which user is being set as the running user,
Open vSwitch daemons on RHEL systems drop capabilities.  This means the
very powerful CAP_SYS_ADMIN is dropped, even when the user is 'root'.

For the majority of use cases this behavior works, as the user can
enable or disable various configurations, regardless of which datapath
functions are desired.  However, when using certain DPDK PMDs, the
enablement and configuration calls require CAP_SYS_ADMIN.

Instead of retaining CAP_SYS_ADMIN in all cases, which would practically
nullify the uid/gid and privilege drop, we don't pass the --ovs-user
option to the daemons.  This shunts the capability and privilege
dropping code.

Reported-by: Marcos Felipe Schwarz <marcos.f.sch@gmail.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-January/045955.html
Fixes: e3e738a3d058 ("redhat: allow dpdk to also run as non-root user")
Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-By: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Russell Bryant <russell@ovn.org>
rhel/usr_lib_systemd_system_ovs-vswitchd.service.in
rhel/usr_lib_systemd_system_ovsdb-server.service