Bug 2382553 - SELinux is preventing lightdm from 'getattr' accesses on the file /var/lib/lastlog/lastlog2.db.
Summary: SELinux is preventing lightdm from 'getattr' accesses on the file /var/lib/la...
Keywords:
Status: CLOSED DUPLICATE of bug 2379871
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:76d36a7999dbc45d37913f17fcb...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-22 03:09 UTC by Ian Laurie
Modified: 2025-07-23 14:00 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-07-23 14:00:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: description (2.37 KB, text/plain)
2025-07-22 03:09 UTC, Ian Laurie
no flags Details
File: os_info (663 bytes, text/plain)
2025-07-22 03:09 UTC, Ian Laurie
no flags Details

Description Ian Laurie 2025-07-22 03:09:28 UTC
Description of problem:
Logged into Xfce.
SELinux is preventing lightdm from 'getattr' accesses on the file /var/lib/lastlog/lastlog2.db.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/var/lib/lastlog/lastlog2.db default label should be var_lib_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /var/lib/lastlog/lastlog2.db

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that lightdm should be allowed getattr access on the lastlog2.db file 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 'lightdm' --raw | audit2allow -M my-lightdm
# semodule -X 300 -i my-lightdm.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:init_var_lib_t:s0
Target Objects                /var/lib/lastlog/lastlog2.db [ file ]
Source                        lightdm
Source Path                   lightdm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-42.1-1.fc43.noarch
Local Policy RPM              selinux-policy-targeted-42.1-1.fc43.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.16.0-0.rc7.58.fc43.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Mon Jul 21 08:08:01 UTC 2025
                              x86_64
Alert Count                   1
First Seen                    2025-07-22 13:07:00 AEST
Last Seen                     2025-07-22 13:07:00 AEST
Local ID                      91b2e928-55f8-4981-8e28-71c73d2d5d21

Raw Audit Messages
type=AVC msg=audit(1753153620.998:154): avc:  denied  { getattr } for  pid=1192 comm="lightdm" path="/var/lib/lastlog/lastlog2.db" dev="sda3" ino=2974366 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_var_lib_t:s0 tclass=file permissive=0


Hash: lightdm,xdm_t,init_var_lib_t,file,getattr

Version-Release number of selected component:
selinux-policy-targeted-42.1-1.fc43.noarch

Additional info:
reporter:       libreport-2.17.15
reason:         SELinux is preventing lightdm from 'getattr' accesses on the file /var/lib/lastlog/lastlog2.db.
package:        selinux-policy-targeted-42.1-1.fc43.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.16.0-0.rc7.58.fc43.x86_64
comment:        Logged into Xfce.
component:      selinux-policy

Comment 1 Ian Laurie 2025-07-22 03:09:30 UTC
Created attachment 2097888 [details]
File: description

Comment 2 Ian Laurie 2025-07-22 03:09:32 UTC
Created attachment 2097889 [details]
File: os_info

Comment 3 Zdenek Pytela 2025-07-23 14:00:45 UTC

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


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