Bug 1419929 - [Errno 2] No such file or directory: '//etc/selinux/targeted/contexts/files/file_contexts.local' while creating man pages
Summary: [Errno 2] No such file or directory: '//etc/selinux/targeted/contexts/files/f...
Keywords:
Status: CLOSED DUPLICATE of bug 1395778
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 7.4
Assignee: Lukas Vrabec
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-07 12:25 UTC by Supreet
Modified: 2020-09-10 10:11 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-08 14:42:49 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Supreet 2017-02-07 12:25:56 UTC
Description of problem:

1. After a minimal RHEL7 installation:
# man -k _selinux
# _selinux: nothing appropriate.

2. After installing the package "policycoreutils-devel" and running "mandb":
# man -k _selinux
# pam_selinux (8)      - PAM module to set the default security context

3. After installing the package "policycoreutils-devel", running "mandb" - executing "touch /etc/selinux/targeted/contexts/files/file_contexts.local (i found out that you don't need a symlink - creating an empty file is enough) 

4. Excuting "sepolicy manpage -a -p /usr/share/man/man8" and  running"mandb" again - you see that the sepolicy command is generating all the *_selnux.8 manpages and that the second mandb is adding 835 manpages.
# man -k _selinux
# _selinux (8)         - Security Enhanced Linux Policy for the processes
# abrt_dump_oops_selinux (8) - Security Enhanced Linux Policy for the abrt_dump_oops processes
# abrt_handle_event_selinux (8) - Security Enhanced Linux Policy for the abrt_handle_event processes
[...]
# zoneminder_script_selinux (8) - Security Enhanced Linux Policy for the zoneminder_script processes
# zoneminder_selinux (8) - Security Enhanced Linux Policy for the zoneminder processes
# zos_remote_selinux (8) - Security Enhanced Linux Policy for the zos_remote processes

why the file /etc/selinux/targeted/contexts/files/file_contexts.local is not provided by default ?

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Server release 7.3 (Maipo)
selinux-policy-targeted-3.13.1-102.el7_3.13.noarch

How reproducible:
Follow the instruction's as mentioned in case description

Actual results:
It is not present

Expected results:
It should be present evenif the system is minimal install

Additional info:
From the newly minimal RHEL 7.3 system :

[root@localhost ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.3 (Maipo)

[root@localhost ~]# less /etc/selinux/targeted/contexts/files/file_contexts
file_contexts               file_contexts.homedirs      file_contexts.subs          
file_contexts.bin           file_contexts.homedirs.bin  file_contexts.subs_dist  

But if does full installation, the file is present by default :


[root@localhost ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.3 (Maipo)

[root@localhost ~]# less /etc/selinux/targeted/contexts/files/file_contexts
file_contexts               file_contexts.homedirs      file_contexts.subs          
file_contexts.bin           file_contexts.homedirs.bin  file_contexts.subs_dist  
file_contexts.local         file_contexts.local.bin

Comment 3 Lukas Vrabec 2017-02-08 14:42:49 UTC

*** This bug has been marked as a duplicate of bug 1395778 ***


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