Bug 471140 - RFE: add semanage command to samba_selinux(8) manual page.
RFE: add semanage command to samba_selinux(8) manual page.
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-11-11 17:56 EST by Murray McAllister
Modified: 2015-01-04 17:35 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-06 03:15:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Murray McAllister 2008-11-11 17:56:50 EST
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.

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

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

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 17:44:21 EST
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 08:46:11 EST
Fixed in selinux-policy-3.5.13-20.fc10
Comment 3 Murray McAllister 2009-01-29 01:35:32 EST
Verified in selinux-policy-3.5.13-40.fc10.noarch

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