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

rpm: fixes for dnf #731

Merged
merged 1 commit into from
Nov 17, 2023
Merged

rpm: fixes for dnf #731

merged 1 commit into from
Nov 17, 2023

Conversation

yizhao1
Copy link
Contributor

@yizhao1 yizhao1 commented Nov 16, 2023

  • Set labels for /var/lib/dnf/.
  • Allow useradd/groupadd to read/append rpm temporary files.
  • Allow rpm_t to send/receive messages from systemd-logind over dbus.
  • Allow rpm_t to use inherited systemd-logind file descriptors.

Fixes:
avc: denied { send_msg } for msgtype=method_call interface=org.freedesktop.login1.Manager member=Inhibit dest=org.freedesktop.login1 spid=565 tpid=331
scontext=root:sysadm_r:rpm_t tcontext=system_u:system_r:systemd_logind_t tclass=dbus permissive=1

avc: denied { send_msg } for msgtype=method_return dest=:1.11 spid=331 tpid=565 scontext=system_u:system_r:systemd_logind_t tcontext=root:sysadm_r:rpm_t tclass=dbus permissive=1

avc: denied { use } for pid=565 comm="python3"
path="/run/systemd/inhibit/1.ref" dev="tmpfs" ino=703 scontext=root:sysadm_r:rpm_t tcontext=system_u:system_r:systemd_logind_t tclass=fd permissive=1

avc: denied { read append } for pid=590 comm="groupadd" path="/tmp/tmpy6epkors" dev="tmpfs" ino=20
scontext=root:sysadm_r:groupadd_t tcontext=root:object_r:rpm_tmp_t tclass=file permissive=1

avc: denied { getattr } for pid=590 comm="groupadd" name="/" dev="proc" ino=1 scontext=root:sysadm_r:groupadd_t tcontext=system_u:object_r:proc_t tclass=filesystem permissive=1

avc: denied { ioctl } for pid=590 comm="groupadd" path="/tmp/tmpy6epkors" dev="tmpfs" ino=20 ioctlcmd=0x5401 scontext=root:sysadm_r:groupadd_t tcontext=root:object_r:rpm_tmp_t tclass=file permissive=1

avc: denied { read append } for pid=626 comm="useradd" path="/tmp/tmpy6epkors" dev="tmpfs" ino=20
scontext=root:sysadm_r:useradd_t tcontext=root:object_r:rpm_tmp_t tclass=file permissive=1

avc: denied { ioctl } for pid=626 comm="useradd" path="/tmp/tmpy6epkors" dev="tmpfs" ino=20 ioctlcmd=0x5401 scontext=root:sysadm_r:useradd_t tcontext=root:object_r:rpm_tmp_t tclass=file permissive=1

* Set labels for /var/lib/dnf/.
* Allow useradd/groupadd to read/append rpm temporary files.
* Allow rpm_t to send/receive messages from systemd-logind over dbus.
* Allow rpm_t to use inherited systemd-logind file descriptors.

Fixes:
avc:  denied  { send_msg } for msgtype=method_call
interface=org.freedesktop.login1.Manager member=Inhibit
dest=org.freedesktop.login1 spid=565 tpid=331
scontext=root:sysadm_r:rpm_t tcontext=system_u:system_r:systemd_logind_t
tclass=dbus permissive=1

avc:  denied  { send_msg } for msgtype=method_return dest=:1.11 spid=331
tpid=565 scontext=system_u:system_r:systemd_logind_t
tcontext=root:sysadm_r:rpm_t tclass=dbus permissive=1

avc:  denied  { use } for  pid=565 comm="python3"
path="/run/systemd/inhibit/1.ref" dev="tmpfs" ino=703
scontext=root:sysadm_r:rpm_t tcontext=system_u:system_r:systemd_logind_t
tclass=fd permissive=1

avc:  denied  { read append } for  pid=590 comm="groupadd"
path="/tmp/tmpy6epkors" dev="tmpfs" ino=20
scontext=root:sysadm_r:groupadd_t tcontext=root:object_r:rpm_tmp_t
tclass=file permissive=1

avc:  denied  { getattr } for  pid=590 comm="groupadd" name="/"
dev="proc" ino=1 scontext=root:sysadm_r:groupadd_t
tcontext=system_u:object_r:proc_t tclass=filesystem permissive=1

avc:  denied  { ioctl } for  pid=590 comm="groupadd"
path="/tmp/tmpy6epkors" dev="tmpfs" ino=20 ioctlcmd=0x5401
scontext=root:sysadm_r:groupadd_t tcontext=root:object_r:rpm_tmp_t
tclass=file permissive=1

avc:  denied  { read append } for  pid=626 comm="useradd"
path="/tmp/tmpy6epkors" dev="tmpfs" ino=20
scontext=root:sysadm_r:useradd_t tcontext=root:object_r:rpm_tmp_t
tclass=file permissive=1

avc:  denied  { ioctl } for  pid=626 comm="useradd"
path="/tmp/tmpy6epkors" dev="tmpfs" ino=20 ioctlcmd=0x5401
scontext=root:sysadm_r:useradd_t tcontext=root:object_r:rpm_tmp_t
tclass=file permissive=1

Signed-off-by: Yi Zhao <[email protected]>
@pebenito pebenito merged commit 662502a into SELinuxProject:main Nov 17, 2023
56 checks passed
@yizhao1 yizhao1 deleted the rpm branch November 18, 2023 06:58
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

Successfully merging this pull request may close these issues.

2 participants