Bug 471140

Summary: RFE: add semanage command to samba_selinux(8) manual page.
Product: [Fedora] Fedora Reporter: Murray McAllister <mmcallis>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: dwalsh, jkubin, mgrepl, vdanen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-06 07:15:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Murray McAllister 2008-11-11 22:56:50 UTC
Description of problem:
The samba_selinux(8) page states:

chcon -t samba_share_t /var/eng

       If you want to make this permanent, i.e. survive a relabel, you must add an entry to the file_contexts.local file.

       /etc/selinux/POLICYTYPE/contexts/files/file_contexts.local
              /var/eng(/.*)? system_u:object_r:samba_share_t

Version-Release number of selected component (if applicable):
selinux-policy-3.5.13-17.fc10.noarch

Expected results:
For targeted policy, "/etc/selinux/targeted/contexts/files/file_contexts.local" has:
# This file is auto-generated by libsemanage
# Do not edit directly.

Maybe the example could be changed to something like:

To make this change permanent (survive a relabel), use the semanage command to add the change to file context configuration:

semanage fcontext -a -t samba_share_t "/var/eng(/*)?"

This command adds the following entry to /etc/selinux/POLICYTYPE/contexts/files/file_contexts.local:

/var/eng(/.*)? system_u:object_r:samba_share_t

Run the restorecon command to apply the changes:

restorecon -R -v /var/eng/


Additional info:
Sorry for being lazy - let me know if I should mail a patch to the SELinux list... ;)

Comment 1 Murray McAllister 2008-11-12 22:44:21 UTC
I typoed "semanage fcontext -a -t samba_share_t "/var/eng(/*)?"
"

Should be:

semanage fcontext -a -t samba_share_t "/var/eng(/.*)?

Comment 2 Daniel Walsh 2008-11-13 13:46:11 UTC
Fixed in selinux-policy-3.5.13-20.fc10

Comment 3 Murray McAllister 2009-01-29 06:35:32 UTC
Verified in selinux-policy-3.5.13-40.fc10.noarch