Bug 740346 - boot.log being created with 644 when umask is set to 077
Summary: boot.log being created with 644 when umask is set to 077
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rsyslog
Version: 6.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Tomas Heinrich
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-21 17:39 UTC by Richard Diekema
Modified: 2011-12-12 12:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-12 12:37:32 UTC


Attachments (Terms of Use)

Description Richard Diekema 2011-09-21 17:39:40 UTC
As part of applying the CIS baseline hardening standards, boot.log should not be world readable. When setting the umask to 077 with the following commands:

sed -i '1i umask 077' /etc/bashrc
sed -i '1i umask 077' /etc/csh.cshrc
sed -i '1i umask 077' /etc/skel/.bashrc
sed -i '1i umask 077' /root/.bashrc
sed -i '1i umask 077' /root/.cshrc
sed -i '1i umask 077' /root/.tcshrc
sed -i '1i umask 077' /etc/profile
sed -i '1i umask 077' /etc/csh.login
sed -i '1i umask 077' /root/.bash_profile

boot.log is still created on boot with 644 permissions set.

To Reproduce:

Set umask to 077 with the following commands:

sed -i '1i umask 077' /etc/bashrc
sed -i '1i umask 077' /etc/csh.cshrc
sed -i '1i umask 077' /etc/skel/.bashrc
sed -i '1i umask 077' /root/.bashrc
sed -i '1i umask 077' /root/.cshrc
sed -i '1i umask 077' /root/.tcshrc
sed -i '1i umask 077' /etc/profile
sed -i '1i umask 077' /etc/csh.login
sed -i '1i umask 077' /root/.bash_profile

boot.log created with 644 permissions.

Comment 2 RHEL Product and Program Management 2011-09-21 18:08:03 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 3 Jan Kaluža 2011-09-27 08:23:13 UTC
logrotate is executed by cron which does not read profile from any file. If you want logrotate to create log files with specific permission, you have to use "create" directive in /etc/logrotate.d/syslog config file. Check "man logrotate" for more info.

> boot.log is still created on boot with 644 permissions set.

I think this is not logrotate's problem, because it does not create that file on boot, it just rotates it when it's big/old enough according to config file.

I will reassign this bug to rsyslog owner.

Comment 4 Tomas Heinrich 2011-10-05 08:55:40 UTC
You may want to try the $FileCreateMode and$umask configuration directives.
http://www.rsyslog.com/doc/rsconf1_filecreatemode.html

Comment 5 Tomas Heinrich 2011-12-12 12:37:32 UTC
This looks like a configuration issue, closing as not-a-bug. Feel free to reopen.


Note You need to log in before you can comment on or make changes to this bug.