RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1231377 - new sanlock config file
Summary: new sanlock config file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.1
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-12 21:16 UTC by David Teigland
Modified: 2015-11-19 10:36 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.13.1-39.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 10:36:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2300 0 normal SHIPPED_LIVE selinux-policy bug fix update 2015-11-19 09:55:26 UTC

Description David Teigland 2015-06-12 21:16:49 UTC
Description of problem:

In 7.2 a config file is being added for the sanlock daemon,
/etc/sanlock/sanlock.conf

The sanlock rpm will install a sample config file.

In the past, I think that new files like this have required an update to the selinux policy for sanlock.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Miroslav Grepl 2015-07-16 08:09:26 UTC
What does

rpm -qf /etc/sanlock

Comment 2 Milos Malik 2015-07-16 08:16:53 UTC
# rpm -qf /etc/sanlock/
sanlock-3.2.4-1.el7.x86_64
# rpm -qf /etc/sanlock/sanlock.conf 
sanlock-3.2.4-1.el7.x86_64
#

Comment 3 Miroslav Grepl 2015-08-05 07:40:09 UTC
Is this config file writable by sanlock daemon? If no, we don't need to add labeling.

Comment 4 David Teigland 2015-08-05 14:25:36 UTC
The spec file has:

install -D -m 0644 src/sanlock.conf \
        $RPM_BUILD_ROOT/etc/sanlock/sanlock.conf

which results in:

ls -l /etc/sanlock/sanlock.conf 
-rw-r--r--. 1 root root 648 Jun 19 12:48 /etc/sanlock/sanlock.conf

which looks standard for other files in /etc.

The sanlock daemon creates a root helper process, and then changes its uid/gid to sanlock/sanlock.

So, while running as root sanlock could write sanlock.conf, but after changing to uid sanlock, I suppose it couldn't.  I hope that answers the question.

Comment 5 Miroslav Grepl 2015-08-06 15:43:53 UTC
It does not matter from SELinux point of view if we talk about root or sanlock user. sanlock will have sanlock_t and will write own config files.

Comment 9 errata-xmlrpc 2015-11-19 10:36:57 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-2015-2300.html


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