[ovs-git] [openvswitch/ovs] 740506: rhel: Use correct user in the logrotate configurat...

GitHub noreply at github.com
Wed Aug 8 17:58:27 UTC 2018

  Branch: refs/heads/branch-2.10
  Home:   https://github.com/openvswitch/ovs
  Commit: 74050661fbcadea0251a9785a55fa8b1725db242
  Author: Markos Chandras <mchandras at suse.de>
  Date:   2018-08-08 (Wed, 08 Aug 2018)

  Changed paths:
    M rhel/etc_logrotate.d_openvswitch
    M rhel/openvswitch-fedora.spec.in
    M rhel/usr_lib_systemd_system_ovsdb-server.service

  Log Message:
  rhel: Use correct user in the logrotate configuration file

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>
Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Timothy Redaelli <tredaelli at redhat.com>

      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

More information about the git mailing list