Bug 1285267

Summary: nss_mymachines does not work with nscd in SELinux enforcing mode
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: selinux-policy-targetedAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED EOL QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 24CC: dwalsh, jpazdziora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-08 12:27:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1285339    
Bug Blocks:    

Description Florian Weimer 2015-11-25 10:22:34 UTC
I get the following messages in the journal:

Nov 25 11:10:19 localhost.localdomain audit[3222]: AVC avc:  denied  { read } for  pid=3222 comm="nscd" name="foo1" dev="tmpfs" ino=36890 scontext=system_u:system_r:nscd_t:s0 tcontext=system_u:object_r:systemd_machined_var_run_t:s0 tclass=file permissive=0
Nov 25 11:10:19 localhost.localdomain audit[3221]: AVC avc:  denied  { read } for  pid=3221 comm="nscd" name="foo1" dev="tmpfs" ino=36890 scontext=system_u:system_r:nscd_t:s0 tcontext=system_u:object_r:systemd_machined_var_run_t:s0 tclass=file permissive=0

This is with:

selinux-policy-targeted-3.13.1-159.fc24.noarch
nscd-2.22.90-21.fc24.x86_64
systemd-228-4.gite35a787.fc24.x86_64

In non-enforcing mode, I get a couple of additional messages:

Nov 25 11:13:30 localhost.localdomain audit[3211]: USER_AVC pid=3211 uid=28 auid=4294967295 ses=4294967295 subj=system_u:system_r:nscd_t:s0 msg='avc:  received setenforce notice (enforcing=0)
                                                    exe="/usr/sbin/nscd" sauid=28 hostname=? addr=? terminal=?'
Nov 25 11:13:30 localhost.localdomain dbus[631]: Can't send to audit system: USER_AVC avc:  received setenforce notice (enforcing=0)
                                                  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?
Nov 25 11:13:32 localhost.localdomain audit[3220]: AVC avc:  denied  { read } for  pid=3220 comm="nscd" name="foo1" dev="tmpfs" ino=36890 scontext=system_u:system_r:nscd_t:s0 tcontext=system_u:object_r:systemd_machined_var_run_t:s0 tclass=file permissive=1
Nov 25 11:13:32 localhost.localdomain audit[3220]: AVC avc:  denied  { open } for  pid=3220 comm="nscd" path="/run/systemd/machines/foo1" dev="tmpfs" ino=36890 scontext=system_u:system_r:nscd_t:s0 tcontext=system_u:object_r:systemd_machined_var_run_t:s0 tclass=file permissive=1
Nov 25 11:13:32 localhost.localdomain audit[3220]: AVC avc:  denied  { getattr } for  pid=3220 comm="nscd" path="/run/systemd/machines/foo1" dev="tmpfs" ino=36890 scontext=system_u:system_r:nscd_t:s0 tcontext=system_u:object_r:systemd_machined_var_run_t:s0 tclass=file permissive=1
Nov 25 11:13:32 localhost.localdomain audit[3220]: AVC avc:  denied  { write } for  pid=3220 comm="nscd" name="system_bus_socket" dev="tmpfs" ino=15161 scontext=system_u:system_r:nscd_t:s0 tcontext=system_u:object_r:system_dbusd_var_run_t:s0 tclass=sock_file permissive=1
Nov 25 11:13:32 localhost.localdomain audit[3220]: AVC avc:  denied  { connectto } for  pid=3220 comm="nscd" path="/run/dbus/system_bus_socket" scontext=system_u:system_r:nscd_t:s0 tcontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tclass=unix_stream_socket permissive=1
Nov 25 11:13:32 localhost.localdomain audit[631]: USER_AVC pid=631 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_call interface=org.freedesktop.DBus member=Hello dest=org.freedesktop.DBus spid=3211 scontext=system_u:system_r:nscd_t:s0 tcontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tclass=dbus
                                                   exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
Nov 25 11:13:32 localhost.localdomain audit[631]: USER_AVC pid=631 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_call interface=org.freedesktop.machine1.Manager member=GetMachineAddresses dest=org.freedesktop.machine1 spid=3211 tpid=866 scontext=system_u:system_r:nscd_t:s0 tcontext=system_u:system_r:systemd_machined_t:s0 tclass=dbus
                                                   exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
Nov 25 11:13:32 localhost.localdomain audit[631]: USER_AVC pid=631 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_return dest=:1.75 spid=866 tpid=3211 scontext=system_u:system_r:systemd_machined_t:s0 tcontext=system_u:system_r:nscd_t:s0 tclass=dbus
                                                   exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'

Comment 1 Florian Weimer 2015-11-25 10:40:02 UTC
Hold on, it's probably a good thing that nss_mymachines not work with nscd.

Comment 2 Jan Kurik 2016-02-24 15:51:32 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 3 Fedora End Of Life 2017-07-25 19:33:34 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 12:27:39 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.