sys-auth/sssd: make sure caps are preserved#45969
Conversation
Pull Request assignmentSubmitter: @257 sys-auth/sssd: @gentoo/base-system, @salahcoronya, @gentoo/proxy-maint Linked bugsNo bugs to link found. If your pull request references any of the Gentoo bug reports, please add appropriate GLEP 66 tags to the commit message and request reassignment. If you do not receive any reply to this pull request, please open or link a bug to attract the attention of maintainers. In order to force reassignment and/or bug reference scan, please append Docs: Code of Conduct ● Copyright policy (expl.) ● Devmanual ● GitHub PRs ● Proxy-maint guide |
|
Please submit this without a revbump so we can actually review the changes. We can perform the revbump when we merge. |
87360d9 to
937baa6
Compare
|
done! i'm realising maybe |
937baa6 to
ceedfc8
Compare
Yeah, I was writing a review comment about that. I think the upstream Makefile will take care of that. |
ceedfc8 to
ff471aa
Compare
dropped them for now regardless ofthe tests i'm doing here, we can always add them later. |
|
On my test boxes, an extra preservation step isn't needed - portage copies the xattrs from the staging are with the file. Is your /var/tmp/portage on a filesystem that doesn't support xattrs, possibly a network one (like NFS/SMB)? |
21a37fa to
f74a738
Compare
Portage does support copying xattrs if ${PORTAGE_TMPDIR} supports them. However, this is not strictly required for all Gentoo systems, and was mainly added to support PaX markings. Applying the caps via fcaps.eclass in pkg_postinst is the right move here and will ensure consistent results. |
hmm, good point, here is my setup: 🦸 root@osif:sys-auth/sssd findmnt /var/tmp/portage
TARGET SOURCE FSTYPE OPTIONS
/var/tmp/portage tmpfs tmpfs rw,nosuid,nodev,noatime,size=174010304k,uid=11482,gid=11482,inode64,huge=within_sizeand we build these images using |
|
and kernel seems to be fine: 🦸 root@osif:sys-auth/sssd zgrep CONFIG_TMPFS_XATTR /proc/config.gz
CONFIG_TMPFS_XATTR=y |
|
Perhaps your mkosi build process does not install sys-libs/libcap before sys-auth/sssd gets built? That would cause the |
Nevermind, I see it is listed in both BDEPEND and DEPEND. |
good call but i don't think so, here are the logs |
you're right actually, that libcap is going into i see |
never mind, it is declared in |
|
hmm, ‣ "emerge --noreplace --verbose --quiet-fail=n --root=/buildroot @encs1" returned non-zero exit code 1.
‣ Sandbox command: mkosi-sandbox --bind /proc /proc --unsetenv TMPDIR --setenv SYSTEMD_OFFLINE 1 --bind
...
osif / # which setcap
/usr/bin/setcap |
|
LGTM |
|
for the record, caps and group ownerships are lost because of id/gid mapping in non-root builds, as mentioned here. systemd-nsresourced.service(8) seems to be upstream's solution; we're testing atm. however, that requires at least i expect |
Signed-off-by: Paymon MARANDI <[email protected]>
f74a738 to
5fb99d4
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the sys-auth/sssd ebuild to preserve upstream-intended POSIX file capabilities on helper binaries by using the fcaps eclass and applying capabilities in pkg_postinst.
Changes:
- Add
fcapsto inherited eclasses forsssd-2.12.0-r1. - Define
FILECAPSentries to apply upstream-like capabilities toldap_child,krb5_child, andsssd_pam. - Invoke
fcaps_pkg_postinstduringpkg_postinstso capabilities are re-applied after installation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pull request CI reportReport generated at: 2026-03-24 18:22 UTC New issues caused by PR: There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
|
hmm, i don't see what checks failed; i think i don't have the permissions to view those(?) |
Ignore that, the bot is blaming you for unrelated changes. |
Signed-off-by: Paymon MARANDI [email protected]
Please check all the boxes that apply:
Signed-off-byline to every commit in the pull request.pkgcheck scan --commits --netto check for issues with my commits.Please note that all boxes must be checked for the pull request to be merged.