Bug 1118262

Summary: Audit daemon will not change group ownership from configuration file after SIGHUP
Product: Red Hat Enterprise Linux 7 Reporter: Milan Koudelka <koudis>
Component: auditAssignee: Steve Grubb <sgrubb>
Status: CLOSED ERRATA QA Contact: Ondrej Moriš <omoris>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: lkundrak, omoris, pmoore, vonsch
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: audit-2.6.1-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1118313 (view as bug list) Environment:
Last Closed: 2016-11-04 06:11:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1118313    
Attachments:
Description Flags
Suggested fix none

Description Milan Koudelka 2014-07-10 10:10:38 UTC
Description of problem:
If I change log_group parameter in /etc/audit/auditd.conf, according to manpage I should send SIGHUP signal to auditd process. But group owner is not changed after this call. Other paramaters like log_file are changed correctly.
Only way how can I use new configuration is call 'service auditd restart', but this is not possible on el7.


Version-Release number of selected component (if applicable):
Name        : audit
Arch        : x86_64
Version     : 2.2
Release     : 2.el6
Size        : 956 k
Repo        : installed
From repo   : sl6


How reproducible:


Steps to Reproduce:
1. change log_group in conf file
2. 'killall -s SIGHUP auditd'
3. check log file group owner

Actual results:


Expected results:


Additional info:

Comment 2 Lubomir Rintel 2014-07-10 12:23:41 UTC
Created attachment 917052 [details]
Suggested fix

Comment 3 Steve Grubb 2014-07-20 14:48:38 UTC
I am not sure this is an audit bug or something that needs better documentation. When you change the group owner, presumably you need to chgrp -R /var/log/audit. Changing the current file does nothing to solve the rest. I have always viewed setting a group to be an admin intervention because of doing the chmod and adding the group to various users.

So, not sure if this should be better documented or not. But its definitely not audit's job to chgrp -R.

Comment 4 Steve Grubb 2016-06-03 21:01:36 UTC
This is not likely to get fixed in RHEL6. Deferring to RHEL7 for future consideration.

Comment 6 Steve Grubb 2016-06-23 20:57:52 UTC
Fixed in upstream commit 1284.

Comment 7 Steve Grubb 2016-06-29 12:21:48 UTC
audit-2.6.1-1.el7 was built to resolve this issue.

Comment 9 Steve Grubb 2016-06-29 14:39:41 UTC
*** Bug 1118313 has been marked as a duplicate of this bug. ***

Comment 10 Ondrej Moriš 2016-06-30 09:06:55 UTC
Successfully reproduced and verified.

OLD
===
# rpm -q audit
audit-2.4.1-5.el7.x86_64

# grep -e "^log_" /etc/audit/auditd.conf
log_file = /var/log/audit/testgroup-audit.log
log_format = RAW
log_group = testgroup

# kill -s SIGHUP 1619
# ls -l /var/log/audit/
total 108
-rw-------. 1 root root 99474 Jun 30 04:59 audit.log
-rw-------. 1 root root   153 Jun 30 05:00 testgroup-audit.log

NEW
===
# rpm -q audit
audit-2.6.1-1.el7.x86_64

# grep -e "^log_" /etc/audit/auditd.conf
log_file = /var/log/audit/testgroup-audit.log
log_group = testgroup
log_format = RAW

# kill -s SIGHUP 1789

# ls -l /var/log/audit/
total 108
-rw-------. 1 root root      99886 Jun 30 05:01 audit.log
-rw-r-----. 1 root testgroup   166 Jun 30 05:03 testgroup-audit.log

Comment 12 errata-xmlrpc 2016-11-04 06:11:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2418.html