RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2120604 - Delegation to unprivileged users doesn't work for scopes in systemd
Summary: Delegation to unprivileged users doesn't work for scopes in systemd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: systemd
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Sekletar
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-23 11:29 UTC by David Tardon
Modified: 2022-11-15 13:10 UTC (History)
3 users (show)

Fixed In Version: systemd-250-11.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 11:18:19 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github systemd systemd pull 23639 0 None Merged scope: allow unprivileged delegation on scopes 2022-08-23 11:29:21 UTC
Red Hat Issue Tracker RHELPLAN-131964 0 None None None 2022-08-23 11:35:21 UTC
Red Hat Product Errata RHBA-2022:8327 0 None None None 2022-11-15 11:18:34 UTC

Description David Tardon 2022-08-23 11:29:21 UTC
This bug was initially created as a copy of Bug #2068575

I am copying this bug because: 
It applies to RHEL-9 too.


Description of problem:
When a process is started by using systemd-run for a user and delegation is requested the cgroup is owned by root and not the user. One of our software engineers has started the process upstream of working this through 
Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
$ useradd test
$ systemd-run --uid=test -p Delegate=yes --scope --unit foo.scope --slice bar.slice /bin/bash
$ ls -ld /sys/fs/cgroup/bar.slice/foo.scope/
drwxr-xr-x. 2 root root 0 Dec  8 08:07 /sys/fs/cgroup/bar.slice/foo.scope/

Actual results:
Root owns cgroup

Expected results:
user that scope is delegated too should have ownership.

Additional info:

Upstream RFE has been created in systemd by Software engineer that we worked with initially when fleshing out ideas on how to work through some client questions.

https://github.com/systemd/systemd/issues/21683

Comment 2 Plumber Bot 2022-08-25 08:06:53 UTC
fix merged to github main branch -> https://github.com/redhat-plumbers/systemd-rhel9/pull/102

Comment 8 errata-xmlrpc 2022-11-15 11:18:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (systemd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8327


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