Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 595355 - SELinux is preventing /usr/libexec/gnome-settings-daemon "getattr" access on /media/borntoshare/pics/backgrounds/nebula-1920x1080.jpg.
Summary: SELinux is preventing /usr/libexec/gnome-settings-daemon "getattr" access ...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:cd4fde28519...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-24 12:51 UTC by Bernhard Schuster
Modified: 2010-05-24 21:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-05-24 21:15:59 UTC

Attachments (Terms of Use)

Description Bernhard Schuster 2010-05-24 12:51:04 UTC

SELinux is preventing /usr/libexec/gnome-settings-daemon "getattr" access on

Detailed Description:

SELinux denied access requested by gnome-settings-. It is not expected that this
access is required by gnome-settings- and this access may signal an intrusion
attempt. It is also possible that the specific version or configuration of the
application is causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
( Please file a bug

Additional Information:

Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:mnt_t:s0
Target Objects                /media/borntoshare/pics/backgrounds/nebula-
                              1920x1080.jpg [ file ]
Source                        gnome-settings-
Source Path                   /usr/libexec/gnome-settings-daemon
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnome-settings-daemon-2.30.1-6.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-15.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                     #1 SMP Thu May 13 05:16:23
                              UTC 2010 x86_64 x86_64
Alert Count                   3
First Seen                    Mon 24 May 2010 02:38:11 PM CEST
Last Seen                     Mon 24 May 2010 02:38:12 PM CEST
Local ID                      81dd2aea-4d2a-44b6-93f2-c22a460cd791
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1274704692.250:16): avc:  denied  { getattr } for  pid=1841 comm="gnome-settings-" path="/media/borntoshare/pics/backgrounds/nebula-1920x1080.jpg" dev=dm-2 ino=53346480 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:mnt_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1274704692.250:16): arch=c000003e syscall=6 success=no exit=-13 a0=d4cf80 a1=7fff3bd85090 a2=7fff3bd85090 a3=1 items=0 ppid=1 pid=1841 auid=4294967295 uid=42 gid=479 euid=42 suid=42 fsuid=42 egid=479 sgid=479 fsgid=479 tty=(none) ses=4294967295 comm="gnome-settings-" exe="/usr/libexec/gnome-settings-daemon" subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  catchall,gnome-settings-,xdm_t,mnt_t,file,getattr
audit2allow suggests:

#============= xdm_t ==============
allow xdm_t mnt_t:file getattr;

Comment 1 Bernhard Schuster 2010-05-24 12:54:01 UTC
gdm does not show the picture as supposed ( I made the nebula-1920x1080 the default background), but after logging in it gets shown

Comment 2 Daniel Walsh 2010-05-24 16:10:33 UTC
This looks like a temporary device?  How are you mounting this borntoshare directory?

You can use a context="system_u:object_r:etc_t:s0" mount flag to tell the system to treat this file system as an etc_t directory.  THen gdm could read it.

Comment 3 Bernhard Schuster 2010-05-24 18:55:56 UTC
I mount it by default via /etc/fstab and it is an internal haraddisk with more or less private data

/dev/mapper/luks-6f7a80f0-33ae-4538-bba1-ed82ca9a56f9 /media/borntoshare      ext4    defaults        1 2

Comment 4 Bernhard Schuster 2010-05-24 19:23:26 UTC
ok, so in the end this is expected behavior, or at most a quirky "Appearance Preferences" Dialog not enabling system access for selinux to the default wallpaper

Comment 5 Daniel Walsh 2010-05-24 21:15:59 UTC
Another option would be to execute the following

# semanage fcontext -a -t usr_t '/media/borntoshare/pics(/.*?)'
# restorecon -R -v /media/borntoshare/pics

This will put a label of usr_t (same as /usr) on the pictures and then gdm will be allowed to read them.

And this is expected behaviour.  We do not want to allow a program like gdm to be able to read any files on your system.  So files under /media by default are not readable.

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