Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ostree admin pin not working with run0 #2564

Open
boredsquirrel opened this issue Feb 6, 2025 · 2 comments
Open

ostree admin pin not working with run0 #2564

boredsquirrel opened this issue Feb 6, 2025 · 2 comments

Comments

@boredsquirrel
Copy link

I tried run0 -u admin which is a wheel user, and sudo from there.

And I tried run0 directly, so root.

in both cases, ostree admin pin 1 failed with a SELinux alert

SELinux hindert (ostree) daran, mit entrypoint-Zugriff auf Datei /usr/bin/ostree zuzugreifen.

*****  Plugin catchall (100. Wahrscheinlichkeit) schlägt vor    **************

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

zusätzliche Information:
Quellkontext                  unconfined_u:unconfined_r:unconfined_t:s0-
                              s0:c0.c1023
Zielkontext                   system_u:object_r:install_exec_t:s0
Zielobjekte                   /usr/bin/ostree [ file ]
Quelle                        (ostree)
Quellpfad                     (ostree)
Port                          <Unbekannt>
Host                          PC
RPM-Pakete der Quelle         
RPM-Pakete des Ziels          ostree-2025.1-1.fc41.x86_64
SELinux Policy RPM            selinux-policy-targeted-41.28-1.fc41.noarch
Local Policy RPM              
SELinux aktiviert             True
Richtlinientyp                targeted
Enforcing-Modus               Enforcing
Rechnername                   PC
Plattform                     Linux PC 6.12.9-200.fc41.x86_64 #1 SMP
                              PREEMPT_DYNAMIC Thu Jan  9 16:05:40 UTC 2025
                              x86_64
Anzahl der Alarme             1
Zuerst gesehen                2025-02-06 21:17:53 CET
Zuletzt gesehen               2025-02-06 21:17:53 CET
Lokale ID                     96f849e3-d393-4980-b935-79b17a02dd7e

Raw-Audit-Meldungen
type=AVC msg=audit(1738873073.948:770): avc:  denied  { entrypoint } for  pid=8101 comm="(ostree)" path="/usr/bin/ostree" dev="dm-0" ino=19856620 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:install_exec_t:s0 tclass=file permissive=0


Hash: (ostree),unconfined_t,install_exec_t,file,entrypoint

btw can I make SEtroubleshoot english?

@boredsquirrel
Copy link
Author

boredsquirrel commented Feb 6, 2025

I also tried using a different TTY, logging in with my SELinux confined "sysadmin-confined" user who is in the wheel group.

It couldnt use ostree admin pin 1 with sudo, but run0 and executing it from that root shell worked

same when entering a run0 root shell from an unconfined or confined user.

@septatrix
Copy link

Not sure who is at fault here but there is a similar upstream issue: systemd/systemd#36266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants