Bug 2218021 - SELinux is preventing geoclue from 'watch' accesses on the directory /etc.
Summary: SELinux is preventing geoclue from 'watch' accesses on the directory /etc.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 38
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:81de2ce943e222d45eceae69386...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-27 21:04 UTC by sjhudson
Modified: 2023-06-28 06:53 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-28 06:53:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (2.17 KB, text/plain)
2023-06-27 21:04 UTC, sjhudson
no flags Details
File: os_info (734 bytes, text/plain)
2023-06-27 21:04 UTC, sjhudson
no flags Details

Description sjhudson 2023-06-27 21:04:15 UTC
Description of problem:
geoclue2 v2.7 requires access to /etc/geolocation for static location service
SELinux is preventing geoclue from 'watch' accesses on the directory /etc.

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

If you want to allow geoclue to have watch access on the etc directory
Then you need to change the label on /etc
Do
# semanage fcontext -a -t FILE_TYPE '/etc'
where FILE_TYPE is one of the following: geoclue_tmp_t, geoclue_var_lib_t.
Then execute:
restorecon -v '/etc'


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

If you believe that geoclue should be allowed watch access on the etc 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:
# ausearch -c 'geoclue' --raw | audit2allow -M my-geoclue
# semodule -X 300 -i my-geoclue.pp

Additional Information:
Source Context                system_u:system_r:geoclue_t:s0
Target Context                system_u:object_r:etc_t:s0
Target Objects                /etc [ dir ]
Source                        geoclue
Source Path                   geoclue
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-38.8-2.fc38.noarch
Local Policy RPM              selinux-policy-targeted-38.8-2.fc38.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.2.9-300.fc38.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Mar 30 22:32:58 UTC 2023
                              x86_64
Alert Count                   15
First Seen                    2023-06-27 14:00:44 PDT
Last Seen                     2023-06-27 14:01:41 PDT
Local ID                      a6a38af6-4346-4620-8909-f137c530da9f

Raw Audit Messages
type=AVC msg=audit(1687899701.196:4691): avc:  denied  { watch } for  pid=343196 comm="gmain" path="/etc" dev="nvme0n1p3" ino=268 scontext=system_u:system_r:geoclue_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=dir permissive=0


Hash: geoclue,geoclue_t,etc_t,dir,watch

Version-Release number of selected component:
selinux-policy-targeted-38.8-2.fc38.noarch

Additional info:
reporter:       libreport-2.17.9
reason:         SELinux is preventing geoclue from 'watch' accesses on the directory /etc.
package:        selinux-policy-targeted-38.8-2.fc38.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.2.9-300.fc38.x86_64
comment:        geoclue2 v2.7 requires access to /etc/geolocation for static location service
component:      selinux-policy

Comment 1 sjhudson 2023-06-27 21:04:18 UTC
Created attachment 1972899 [details]
File: description

Comment 2 sjhudson 2023-06-27 21:04:20 UTC
Created attachment 1972900 [details]
File: os_info

Comment 3 Zdenek Pytela 2023-06-28 06:53:47 UTC
Added in 38.10-1


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