Bug 1368624 - SELinux run afoul of keyword "/export"
Summary: SELinux run afoul of keyword "/export"
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: libsemanage
Version: 24
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-20 06:54 UTC by Todd
Modified: 2017-08-08 16:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 16:38:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Todd 2016-08-20 06:54:22 UTC
sesmanage runs afoul of keyword "export"

#/usr/sbin/semanage fcontext -a -t samba_share_t "/export(/.*)?"

libsemanage.dbase_llist_query: could not query record value (No such file or directory).
FileNotFoundError: [Errno 2] No such file or directory 


Changing "export" to exports" fixes the issue

Comment 1 Petr Lautrbach 2016-10-04 14:52:36 UTC
The error message is unfortunate. However you can't add or change a FILE_SPEC which is already defined by the system policy:

# semanage fcontext -l | grep '/export(/.*)?'
/export(/.*)?                                      all files          system_u:object_r:usr_t:s0 

While it's possible to use a more specific FILE_SPEC, see bellow, it won't override /export directory itself:

# /usr/sbin/semanage fcontext -a -t samba_share_t "/export/(.*)?"

# matchpathcon /export/
/export	system_u:object_r:usr_t:s0

# matchpathcon /export/file
/export/file	system_u:object_r:samba_share_t:s0

Comment 2 Petr Lautrbach 2017-01-03 13:23:39 UTC
This is fixed in the current Rawhide and Fedora 25:

# /usr/sbin/semanage fcontext -a -t samba_share_t "/export(/.*)?"
libsemanage.dbase_llist_query: could not query record value (No such file or directory).

# /usr/sbin/semanage fcontext -l -C
SELinux fcontext                                   type               Context

/export(/.*)?                                      all files          system_u

Comment 3 Fedora End Of Life 2017-07-25 22:31:48 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2017-08-08 16:38:17 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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