DARWIN: On macOS 12, mount afs on user's directory 25/14925/6
authorMarcio Barbosa <mbarbosa@sinenomine.net>
Thu, 7 Apr 2022 22:51:21 +0000 (22:51 +0000)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 13 May 2022 18:05:19 +0000 (14:05 -0400)
commit1c7eda8ea83bee3e674435109efccbc6082e4765
tree562e982f49cc1a17ba9e7ac6905936c26571e5f0
parent873d803a3dc7acffd74c9432872bed4f6575abf9
DARWIN: On macOS 12, mount afs on user's directory

Currently, /afs is mounted/unmounted by a LaunchDaemon. In order to
unmount /afs on restart/shutdown, this daemon runs umount -force /afs.
Unfortunately, SIP (System Integrity Protection) is not allowing the
LaunchDaemon in question to run this command successfully on macOS 12
(exclusively on restart/shutdown):

  umount: Operation not permitted

In this situation, afs can't be turned off correctly, leaving many
unkillable afsd processes lingering around. As a result, the
restart/shutdown process gets stuck indefinitely.

Fortunately, this problem doesn't happen if /afs is mounted on an user's
directory. That said, avoid this issue by mounting /afs on the current
user's directory (/Users/$USER/OpenAFS/afs). Notice that afs is still
accessible (including for other users) through a synthetic link added in
the root directory (/afs -> /Users/$USER/OpenAFS/afs).

Change-Id: Id05d811e785057a82b73d0946154d9be8b5d772a
Reviewed-on: https://gerrit.openafs.org/14925
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/packaging/MacOS/OpenAFS.post_install