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.
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.
c&p from tree_has_selinux_xattr. We may want to generalize the function instead.
There was a problem hiding this comment.
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.
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.
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.