[ovs-dev] [PATCH v3] rhel: Use correct user in the logrotate configuration file

Timothy Redaelli tredaelli at redhat.com
Wed Aug 8 15:52:55 UTC 2018


On Wed,  8 Aug 2018 17:27:25 +0300
Markos Chandras <mchandras at suse.de> wrote:

> The /var/log/openvswitch directory is owned by the openvswitch user
> but logrotate could be running as root or as another user. As a
> result of which, rpmlint prints the following warning when building
> the spec file on SUSE Linux Enterprise:
> 
> openvswitch.x86_64: W:
> suse-logrotate-user-writable-log-dir /var/log/openvswitch
> openvswitch:openvswitch 0750 The log directory is writable by
> unprivileged users. Please fix the permissions so only root can write
> there or add the 'su' option to your logrotate config
> 
> In order to fix that, we should run the logrotate script as the same
> user which runs the various Open vSwitch daemons. If this is a new
> installation, then this user is the 'openvswitch' one, but if we are
> upgrading from an older release, then the user is normally 'root'.
> As such, we set the initial user to 'root' and we fix this up in the
> %post scriptlet.
> 
> Cc: Aaron Conole <aconole at redhat.com>
> Cc: Timothy Redaelli <tredaelli at redhat.com>
> Signed-off-by: Markos Chandras <mchandras at suse.de>

Acked-by: Timothy Redaelli <tredaelli at redhat.com>


More information about the dev mailing list