A convenient feature of scponly is the ability to specify the initial directory of a chroot'd user by setting their home directory to: /home/scponly//pub Here /home/scponly is the chroot directory and /pub is the initial directory in the chroot. However, the scponly-4.8-r4 ebuild includes the following hard coded compile option: --with-default-chdir="/" This effectively removes this feature because it forces the chdir to always be "/". This compiler option should be removed (simply removing this line works fine) and the scponly home directory updated. I have created a patch for the ebuild that does these two things. Reproducible: Always Steps to Reproduce:
Created attachment 234223 [details, diff] scponly-4.8-r4_chdir_fix.patch
I don't like this default chdir too. Why is it enable by default? Users really don't like it.
Another vote in favor of applying Nathan's patch. This isn't hard to fix with an overlay ebuild, but it shouldn't be necessary at all - why is this useful feature being disabled? And it's not just affecting the scponlyc chroot jail version, either - the regular scponly version is also forcing all users to start out in / when they connect via scponly, ignoring their defined home directory.
Just ran into this myself over the past couple of days and eventually tracked it down to this. Get rid of it or make it a USE flag.
sbriesen introduced this change, so I am adding him to the CC list. Is there any downside to doing this?
+*scponly-4.8-r5 (13 Oct 2013) + + 13 Oct 2013; Pacho Ramos <pacho@gentoo.org> +scponly-4.8-r5.ebuild: + Replace pkg_setup hacks (#371667), drop default chdir (#322901) +