-
Notifications
You must be signed in to change notification settings - Fork 403
Various small fixes #4119
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
base: main
Are you sure you want to change the base?
Various small fixes #4119
Conversation
‣ Validating certificates and keys cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted cp: setting attribute 'security.ima' for 'security.ima': Operation not permitted ‣ "cp --recursive --no-dereference --preserve=mode,links,timestamps,ownership,xattr --reflink=auto --copy-contents /work/usr/share/crypto-policies/back-ends/DEFAULT /work/home/elmarco/.cache/mkosi/mkosi-workspace-5c6zgtv2/sandbox/etc/crypto-policies/back-ends --no-target-directory" returned non-zero exit code 1.
‣ An EFI bootable image with systemd-boot was requested but a systemd-boot binary was not found at /usr/lib/systemd/boot/efi This is required to provide /usr/lib/systemd/boot/efi/systemd-bootx64.efi
Dead since commit 634b0ef.
| return any( | ||
| "security.ima" in os.listxattr(p, follow_symlinks=False) for p in (path, *path.rglob("*")) | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ruff complains
| return any( | |
| "security.ima" in os.listxattr(p, follow_symlinks=False) for p in (path, *path.rglob("*")) | |
| ) | |
| return any("security.ima" in os.listxattr(p, follow_symlinks=False) for p in (path, *path.rglob("*"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c&p from tree_has_selinux_xattr. We may want to generalize the function instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ruff complains here because security.ima is shorter than security.selinux and therefore this fits on a single line. Either way, this needs to be addressed.
| if tree_has_ima_xattr(src): | ||
| with_xattrs = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems problematic, since even if we decided to e.g. copy xattr to keep selinux attributes around, we'd drop them if a file also has these xattrs.
Despite being a bit annoying is there any issue with the warning from cp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cp fails with exit 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, but since this is the same as security.selinux then, shouldn't it be be
statfs(os.fspath(dst.parent)) != OVERLAYFS_SUPER_MAGIC
or (not tree_has_selinux_xattr(src) and not tree_has_ima_xattr(src))then?
No description provided.