Bug 2381604 - SELinux is preventing /usr/libexec/gdm-session-worker from 'lock' accesses on the file /var/lib/lastlog/lastlog2.db.
Summary: SELinux is preventing /usr/libexec/gdm-session-worker from 'lock' accesses on...
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:8febc7a7f36a4c310b204f375b5...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-17 09:41 UTC by Mikhail
Modified: 2025-07-23 14:00 UTC (History)
8 users (show)

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


Attachments (Terms of Use)
File: description (2.89 KB, text/plain)
2025-07-17 09:41 UTC, Mikhail
no flags Details
File: os_info (740 bytes, text/plain)
2025-07-17 09:41 UTC, Mikhail
no flags Details

Description Mikhail 2025-07-17 09:41:09 UTC
Description of problem:
SELinux is preventing /usr/libexec/gdm-session-worker from 'lock' 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 gdm-session-worker should be allowed lock 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 'gdm-session-wor' --raw | audit2allow -M my-gdmsessionwor
# semodule -X 300 -i my-gdmsessionwor.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                        gdm-session-wor
Source Path                   /usr/libexec/gdm-session-worker
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gdm-49~alpha.1-1.fc43.x86_64
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                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 6.16.0-
                              0.rc6.250715g155a3c003e55.53.fc43.x86_64+debug #1
                              SMP PREEMPT_DYNAMIC Wed Jul 16 10:58:51 UTC 2025
                              x86_64
Alert Count                   22
First Seen                    2025-07-11 19:13:44 +05
Last Seen                     2025-07-17 13:03:38 +05
Local ID                      94f5d8ca-6ebf-472d-9ef4-8f3e40c91960

Raw Audit Messages
type=AVC msg=audit(1752739418.283:370): avc:  denied  { lock } for  pid=3417 comm="gdm-session-wor" path="/var/lib/lastlog/lastlog2.db" dev="nvme0n1p3" ino=158133466 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_var_lib_t:s0 tclass=file permissive=1


type=SYSCALL msg=audit(1752739418.283:370): arch=x86_64 syscall=fcntl success=yes exit=0 a0=a a1=6 a2=7ffe17445a60 a3=0 items=0 ppid=1856 pid=3417 auid=1000 uid=0 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=2 comm=gdm-session-wor exe=/usr/libexec/gdm-session-worker subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash: gdm-session-wor,xdm_t,init_var_lib_t,file,lock

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 /usr/libexec/gdm-session-worker from 'lock' 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.rc6.250715g155a3c003e55.53.fc43.x86_64+debug
component:      selinux-policy

Comment 1 Mikhail 2025-07-17 09:41:12 UTC
Created attachment 2097458 [details]
File: description

Comment 2 Mikhail 2025-07-17 09:41:13 UTC
Created attachment 2097459 [details]
File: os_info

Comment 3 Zdenek Pytela 2025-07-23 14:00:06 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.