This patch is useful for certain jail environments that meet the following criteria: - /etc is mounted read-only. - The passwd files are symlinked to a different directory which is root-writable. - Users shall be able to use passwd(1), chsh(1) etc. Ordinarily that won't work because the tools that work on the passwd files try to create temporary files in /etc. That fails because /etc is read-only. This patch changes the way temporary files are created by first calling realpath(3) on the symlink, so it is resolved to the directory containing the actual passwd files, which is root-writable. Any temporary files are then created in that directory. How to use: Make sure your source (/usr/src) is up to date. Please download the patch appropriate for your FreeBSD version. The patch is relative to /usr/src, so the following commands should work: # cd /usr/src # patch < /tmp/X-stable.patch.txt Then perform the usual "make world" update, please see the FreeBSD Handbook and /usr/src/UPDATING for details. You're done. If you have already done a "buildworld" before applying the patch, and you don't want to build everything all over again, then perform the following steps. On FreeBSD 4 you need to rebuild and install the tools vipw (src/usr.sbin/vipw), chpass (src/usr.bin/chpass) and passwd (src/usr.bin/passwd). On FreeBSD 5 and above you only need to rebuild and install libutil (src/lib/libutil). To rebuild and install, go to the source directory (the one given in parentheses above), then do this: # make clean # make # make install # Unless you do "installworld" anyway! This assumes that you have done a "buildworld" before and have a populated /usr/obj directory. --