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
systemctl link fails since 223: Unit name is not valid. #879
Comments
This got broken by 4938696 ("selinux: fix missing SELinux unit access check"). Reverting this commit on top of current master fixes this again. @d-hatayama , any idea? |
This is an utter hack and not a final solution, but it may illustrate where the problem is:
I just don't have any clue about SELinux or what this access check does, so I don't know how to fix that properly, I'm afraid.. |
Seeing something similar here under 219 that just popped up after a Fedora 22 update: Failed to execute operation: Unit name /home/cmorgan/projects/x/build/rootfs/lib/systemd/system/xx.service is not valid. This has been working for us daily for some time now. Not sure if there was a micro bump in systemd revision or if a separate F22 change broke things but it looks like the same issue from the output. If it seems F22 related apologies for the noise. |
This is due to a overlook of the case that mac_selinux_unit_access_check_strv() could pass a path via l to the 2nd argument of manager_load_unit(). As a result, the following check in manager_load_unit_prepare() invalidates absolute paths.
The fix I come up with is:
|
I created the fix as a pull request. Please see #1044. |
Thanks @d-hatayama ! Merged. |
Until systemd 222 this worked:
With 223 (and 224) this got broken:
The text was updated successfully, but these errors were encountered: