Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix sbit removal if fchmodat() doesn't support AT_SYMLINK_NOFOLLOW
glibc versions prior to 2020 know about AT_SYMLINK_NOFOLLOW but don't actually implement it for fchmodat() and returns ENOSYS when used. We don't check the return code in removeSBITS() so this silently fails on those older versions. We already verify the thing is not a link in the fstatat() condition because cap_set_fileat() doesn't have any "dont follow" mode at all, so we can just as well drop it from the fchmodat() and make this work on more libc versions. Add a test for the suid bit removal while at it.
- Loading branch information