OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-219-g28bb52f
Gerrit Code Review
gerrit@openafs.org
Tue, 29 Apr 2025 11:16:54 -0400
The following commit has been merged in the master branch:
commit 28bb52f5f3f9fbd3ad3c6a128b82b96a050d7c55
Author: Cheyenne Wills <cwills@sinenomine.net>
Date: Thu Apr 17 17:07:16 2025 -0600
afs: Set 0555 perms on /afs dynroot directory
When -dynroot is given to afsd, our synthetic /afs directory is created
with permission mode bits of 0755, and cannot be changed by chmod() or
anything else.
On Red Hat Enterprise Linux 9, the 'filesystem' RPM (at least for
version 3.16-5) includes an entry for the /afs directory, to make sure
the empty mountpoint exists, which specifies perm mode bits of 0555:
%attr(0555, root,root) /afs
If that 'filesystem' RPM is installed/updated while /afs is mounted, the
process will fail, since it tries to set the permissions of /afs to
0555:
Upgrading : filesystem-3.16-5.el9.x86_64 1/2 Error unpacking rpm package filesystem-3.16-5.el9.x86_64
Verifying : filesystem-3.16-5.el9.x86_64 1/2
Verifying : filesystem-3.16-2.el9.x86_64 2/2
Installed products updated. Failed: filesystem-3.16-2.el9.x86_64 filesystem-3.16-5.el9.x86_64
Error: Transaction failed
There is no need for the mode bits to specifically be 0755, so to avoid
this issue, just change the permissions for -dynroot /afs to be 0555
instead. This causes RPM to see that the permissions on the dir are
already what it expects, so it doesn't try to change the permissions.
Add some text to the -dynroot option in the afsd(8) manpage, documenting
what the mode bits are for the directory.
This commit does not add any way to change what the mode bits are for
/afs when -dynroot is enabled, since there aren't any reasons to need to
set them besides the situation with the 'filesystem' RPM. If this
becomes an issue, future commits can add a way to change the mode bits.
Additional background for the issue with the 'filesystem' RPM is
described in the Red Hat ticket:
https://issues.redhat.com/browse/RHEL-83649
[adeason@sinenomine.net: commit message phrasing, afsd manpage update.]
Change-Id: I2e201662a206c0f17e846f3de1d0ad87f861d259
Reviewed-on: https://gerrit.openafs.org/16368
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
doc/man-pages/pod8/afsd.pod.template | 3 +++
src/afs/afs_dynroot.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
--
OpenAFS Master Repository