Name: Anonymous 2009-02-08 11:35
has anyone noticed that the ChrootDirectory manual in sshd_config(5) says you can use tokens like %u and %h to automatically define a users home directory as chroot
but at the same time it says that the directory defined by ChrootDirectory and all its parents must be owned by root and not writable by world or group
so basically, you can create a chroot environment for each user automatically on login but you must have some sort of subdir that the user is allowed to own and then lose all standard functionality of a user account
i find this moronic but i assume the openbsd team did it for some security reason, prolly if your user dir is owned by someone else you can cause trouble for that user or others, i dunno, i just discovered this shit and i hate it so i'm not in the best mood towards the openbsd team right now
maybe setting the append only flag on each user dir would prevent this but then it wouldn't be portable to linsux systems that lack chflags
but at the same time it says that the directory defined by ChrootDirectory and all its parents must be owned by root and not writable by world or group
so basically, you can create a chroot environment for each user automatically on login but you must have some sort of subdir that the user is allowed to own and then lose all standard functionality of a user account
i find this moronic but i assume the openbsd team did it for some security reason, prolly if your user dir is owned by someone else you can cause trouble for that user or others, i dunno, i just discovered this shit and i hate it so i'm not in the best mood towards the openbsd team right now
maybe setting the append only flag on each user dir would prevent this but then it wouldn't be portable to linsux systems that lack chflags