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 691828 - include sanlock
Summary: include sanlock
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-29 15:05 UTC by David Teigland
Modified: 2012-10-04 10:15 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.7.19-106.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 09:46:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
sanlock and wdmd files (30.17 KB, application/x-gzip)
2011-05-18 16:52 UTC, David Teigland
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1511 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2011-12-06 00:39:17 UTC

Description David Teigland 2011-03-29 15:05:17 UTC
Description of problem:

Include bits to support sanlock and wdmd; used by libvirt and vdsm.
(The policy for them isn't finalized yet.)

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 6 David Teigland 2011-04-04 15:14:21 UTC
This is not a "bug" per se.  sanlock is a new package we intend to add to 6.2, and this is a request to include the relevant selinux policy for it.

Comment 7 Miroslav Grepl 2011-04-04 15:24:48 UTC
Ok, then it should be moved to 6.2.

Comment 9 David Teigland 2011-05-18 16:52:53 UTC
Created attachment 499641 [details]
sanlock and wdmd files

The attached tarball includes the following files which Dan Walsh originally created for me.  Please include the relevant ones in the policy package. (I'm not sure which of them you need).  I expect we'll need to submit updates to these as we do more sanlock testing with libvirt and vdsm.

sanlock.fc
sanlock.if
sanlock.pp
sanlock.sh*
sanlock.te
wdmd.fc
wdmd.if
wdmd.pp
wdmd.sh*
wdmd.te

Comment 10 Daniel Walsh 2011-05-23 22:38:34 UTC
I added those to Rawhide.

Comment 11 Miroslav Grepl 2011-06-29 11:59:24 UTC
I am backporting to RHEL6.2.

Comment 12 Miroslav Grepl 2011-06-29 13:56:20 UTC
Fixed in selinux-policy-3.7.19-101.el6

Comment 15 David Teigland 2011-07-26 14:46:11 UTC
sanlock does use standard random functions, random(), random_r(), initstate_r().
It does not access /dev/urandom or /proc/stat directly.

Comment 19 David Teigland 2011-08-01 18:04:10 UTC
In the next set of patches I'm changing the pid and socket files to:
/var/run/wdmd.pid
/var/run/wdmd.sock
/var/run/sanlock.pid
/var/run/sanlock.sock

(I'm not sure if this will impact the selinux policies, noting here just in case.)

Comment 20 Daniel Walsh 2011-08-01 21:14:20 UTC
If you are going to change the location, how about moving them to their own directory.

/var/run/sanlock/
and 

/var/run/wdmd/

Comment 21 David Teigland 2011-08-01 21:33:15 UTC
They were in those dirs, but in bug 711534 you suggested /var/lock/ instead, and I'm not sure who's supposed to create those dirs and when anyhow... I'm sure I'd get that wrong, too.  So, I'm trying to come up with the simplest thing that will just make all these issues go away.

Comment 22 Miroslav Grepl 2011-08-02 08:10:03 UTC
/var/lock was suggested for lock files.


/var/run/sanlock
/var/run/wdmd 

directories should be for sanclok, wdmd sock and pid files. So we would like to see

/var/run/sanlock/sanlock.pid
/var/run/sanlock/sanlock.sock

/var/run/wdmd/wdmd.pid
/var/run/wdmd/wdmd.sock

Comment 23 David Teigland 2011-08-02 15:20:17 UTC
OK, I can put them back there (although the pid file is the lock file.)  This does leave the question from bug 711534 about who creates those dirs and when
(if the binary creates them, they don't exist for the init script initially).  How about this:

init.d/wdmd will mkdir -p /var/run/wdmd
init.d/sanlock will mkdir -p /var/run/sanlock

/usr/sbin/wdmd will mkdir("/var/run/wdmd")
/usr/sbin/sanlock will mkdir("/var/run/sanlock")

Will that satisfy everyone?

Comment 24 Daniel Walsh 2011-08-02 20:20:55 UTC
How about

if [! -d /var/run/wdmd ];then 
          mkdir -p /var/run/wdmd
          [ -x /usr/sbin/restorecon ] && restorecon /var/run/wdmd
fi

...

Comment 25 David Teigland 2011-08-02 21:50:36 UTC
done, thanks

Comment 28 errata-xmlrpc 2011-12-06 09:46:11 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.

http://rhn.redhat.com/errata/RHBA-2011-1511.html


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