Bug 680908 - SELinux is preventing /usr/bin/gdb from 'write' accesses on the directory /usr/share/glib-2.0/gdb.
Summary: SELinux is preventing /usr/bin/gdb from 'write' accesses on the directory /us...
Keywords:
Status: CLOSED DUPLICATE of bug 528554
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: i386
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:1a64fb3a3cb...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-28 13:20 UTC by Mircea Sava
Modified: 2011-02-28 18:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-28 18:15:33 UTC
Type: ---


Attachments (Terms of Use)

Description Mircea Sava 2011-02-28 13:20:40 UTC
SELinux is preventing /usr/bin/gdb from 'write' accesses on the directory /usr/share/glib-2.0/gdb.

*****  Plugin catchall_labels (83.8 confidence) suggests  ********************

If you want to allow gdb to have write access on the gdb directory
Then you need to change the label on /usr/share/glib-2.0/gdb
Do
# semanage fcontext -a -t FILE_TYPE '/usr/share/glib-2.0/gdb'
where FILE_TYPE is one of the following: dhcpc_state_t, var_log_t, NetworkManager_var_lib_t, NetworkManager_var_run_t, net_conf_t, dnsmasq_var_run_t, tmp_t, etc_t, named_cache_t, NetworkManager_tmp_t, NetworkManager_etc_rw_t, NetworkManager_etc_t, NetworkManager_log_t, var_lib_t, var_run_t, root_t. 
Then execute: 
restorecon -v '/usr/share/glib-2.0/gdb'


*****  Plugin catchall (17.1 confidence) suggests  ***************************

If you believe that gdb should be allowed write access on the gdb directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep gdb /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:NetworkManager_t:s0
Target Context                system_u:object_r:usr_t:s0
Target Objects                /usr/share/glib-2.0/gdb [ dir ]
Source                        gdb
Source Path                   /usr/bin/gdb
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gdb-7.2-41.fc14
Target RPM Packages           glib2-devel-2.26.0-2.fc14
Policy RPM                    selinux-policy-3.9.7-31.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.11-83.fc14.i686
                              #1 SMP Mon Feb 7 07:04:18 UTC 2011 i686 i686
Alert Count                   2
First Seen                    Mon 28 Feb 2011 02:57:43 PM EET
Last Seen                     Mon 28 Feb 2011 02:57:43 PM EET
Local ID                      b2b6d1ff-f1cc-4ffa-9568-ed47ebebe24f

Raw Audit Messages
type=AVC msg=audit(1298897863.70:25): avc:  denied  { write } for  pid=2269 comm="gdb" name="gdb" dev=dm-0 ino=2238144 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=dir


type=SYSCALL msg=audit(1298897863.70:25): arch=i386 syscall=open success=no exit=EACCES a0=bfd6b66b a1=82c1 a2=81a4 a3=bfd6c6db items=0 ppid=2268 pid=2269 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=gdb exe=/usr/bin/gdb subj=system_u:system_r:NetworkManager_t:s0 key=(null)

Hash: gdb,NetworkManager_t,usr_t,dir,write

audit2allow

#============= NetworkManager_t ==============
#!!!! The source type 'NetworkManager_t' can write to a 'dir' of the following types:
# dhcpc_state_t, var_log_t, NetworkManager_var_lib_t, NetworkManager_var_run_t, net_conf_t, dnsmasq_var_run_t, tmp_t, etc_t, named_cache_t, NetworkManager_tmp_t, NetworkManager_etc_rw_t, NetworkManager_etc_t, NetworkManager_log_t, var_lib_t, var_run_t, root_t

allow NetworkManager_t usr_t:dir write;

audit2allow -R

#============= NetworkManager_t ==============
#!!!! The source type 'NetworkManager_t' can write to a 'dir' of the following types:
# dhcpc_state_t, var_log_t, NetworkManager_var_lib_t, NetworkManager_var_run_t, net_conf_t, dnsmasq_var_run_t, tmp_t, etc_t, named_cache_t, NetworkManager_tmp_t, NetworkManager_etc_rw_t, NetworkManager_etc_t, NetworkManager_log_t, var_lib_t, var_run_t, root_t

allow NetworkManager_t usr_t:dir write;

Comment 1 Daniel Walsh 2011-02-28 18:15:33 UTC

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


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