Bug 2157900

Summary: SELinux is preventing cockpit-session from 'create' accesses on the Datei .google_authenticator~CvnGGP.
Product: [Fedora] Fedora Reporter: Flo <augenauf>
Component: cockpitAssignee: Martin Pitt <mpitt>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: k.koukiou, mmarusak, mpitt, patrick, stefw, user-cont-team+packit-fas
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:094eb3331fef4c6ad53d1c09cff95e265da9dbb6f6fe7a294f019386d860cd50;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-03 14:53:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Flo 2023-01-03 13:52:21 UTC
Description of problem:
this has to happen after securing cockpit on localhost with 2FA (google-authenticator)
SELinux is preventing cockpit-session from 'create' accesses on the Datei .google_authenticator~CvnGGP.

*****  Plugin catchall (100. confidence) suggests   **************************

Wenn Sie denken, dass es cockpit-session standardmäßig erlaubt sein sollte, create Zugriff auf .google_authenticator~CvnGGP file zu erhalten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# ausearch -c 'cockpit-session' --raw | audit2allow -M my-cockpitsession
# semodule -X 300 -i my-cockpitsession.pp

Additional Information:
Source Context                system_u:system_r:cockpit_session_t:s0
Target Context                system_u:object_r:user_home_dir_t:s0
Target Objects                .google_authenticator~CvnGGP [ file ]
Source                        cockpit-session
Source Path                   cockpit-session
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-36.17-1.fc36.noarch
Local Policy RPM              cockpit-ws-282-1.fc36.x86_64
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 6.0.15-200.fc36.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Wed Dec 21 18:46:09 UTC 2022
                              x86_64 x86_64
Alert Count                   2
First Seen                    2023-01-03 14:49:15 CET
Last Seen                     2023-01-03 14:49:35 CET
Local ID                      d5239420-6da7-4d79-ac8a-3613609844a9

Raw Audit Messages
type=AVC msg=audit(1672753775.253:949): avc:  denied  { create } for  pid=16842 comm="cockpit-session" name=".google_authenticator~CvnGGP" scontext=system_u:system_r:cockpit_session_t:s0 tcontext=system_u:object_r:user_home_dir_t:s0 tclass=file permissive=0


Hash: cockpit-session,cockpit_session_t,user_home_dir_t,file,create

Version-Release number of selected component:
selinux-policy-targeted-36.17-1.fc36.noarch

Additional info:
component:      cockpit
reporter:       libreport-2.17.4
hashmarkername: setroubleshoot
kernel:         6.0.15-200.fc36.x86_64
type:           libreport

Comment 1 Martin Pitt 2023-01-03 14:53:03 UTC
This and #2157901 are very similar, I'll handle them together. Thanks for the report!

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