the entry for app-misc/jail is /usr/jail and should obviously be /usr/bin/jail. local login into jailed environment is unaffected, but ssh login will fail - as will other programs depending on /etc/shells Reproducible: Always Steps to Reproduce: 1. set up a jail and jailed user as documented 2. try to ssh-login Actual Results: ssh login failed Expected Results: ssh login should have been successfull (yes!) easy workaround, but not that easy to get the right idea, i think.
I don't see where docs tell you to add /usr/jail to /etc/shells?
docs don't tell me, gentoo had that entry in /etc/shells (after emerging jail, don't know if it was there before). gentoo is friendly enough to add jail as a shell automagically, but adds it with the wrong path - it has to be /usr/bin/jail, not /usr/jail
when i say "gentoo is friendly enough" that's because i think that entry was there before emerging jail - at least i did no etc-update after merging. not 100% sure about that though, and i wasn't motivated enough to read the ebuild for jail
found the problem, not gentoo's fault: in the jail source in lib/arch/generic/functions beginning at line 817, jail adds itself to /etc/shells. at this point, $INSTALLDIR/jail is used instead of $INSTALLDIR/bin/jail - in another script, the jail bin is installed to $INSTALLDIR/bin/jail. workaround could be to make the ebuild patch lib/arch/generic/functions lines 826 and 834 after unpacking.
i just browsed through the mailing list archive for jail to find out whether i should hint the author at this, and i found http://sourceforge.net/mailarchive/message.php?msg_id=5267662 describing exactly this problem. yours to decide whether to let the ebuild patch this until a new version of jail is released - but i think it can be done easily. patching a /etc/shells already messed up by jail will be more of a problem.
I have added a patch to the build in portage. Thanks for noticing this :)