Bug 1081609

Summary: spice-vdagent needs to be able to read /proc/$pid/cgroup
Product: [Fedora] Fedora Reporter: Christophe Fergeau <cfergeau>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, lvrabec, mgrepl
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: 2014-03-28 08:47:47 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:    
Bug Blocks: 1060329    

Description Christophe Fergeau 2014-03-27 16:54:59 UTC
Once bug #1060329 is fixed, spice-vdagent will be automatically started when gdm greeter is started.
However, this also triggers a SELinux warnings when spice-vdagentd (different process from spice-vdagent) calls sd_pid_get_session($pidof(spice-vdagent)). This calls tries to parse (open/read) /proc/$(pidof spice-vdagent)/cgroup which is not allowed by the selinux policy:

type=AVC msg=audit(1395923290.618:35805): avc:  denied  { search } for  pid=652 comm="spice-vdagentd" name="27399" dev="proc" ino=1600740 scontext=system_u:system_r:vdagent_t:s0 tcontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tclass=dir
type=SYSCALL msg=audit(1395923290.618:35805): arch=c000003e syscall=2 success=no exit=-13 a0=7fff98cda960 a1=80000 a2=1b6 a3=2 items=0 ppid=1 pid=652 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="spice-vdagentd" exe="/usr/sbin/spice-vdagentd" subj=system_u:system_r:vdagent_t:s0 key=(null)

Comment 1 Miroslav Grepl 2014-03-28 08:47:47 UTC
commit 1abc12555f8f7f975c13d14de9279c1e8806a7a7
Author: Miroslav Grepl <mgrepl>
Date:   Fri Mar 28 09:46:42 2014 +0100

    Allow vdagent to read xdm state