Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25390 - wrong entry for app-misc/jail in /etc/shells
Summary: wrong entry for app-misc/jail in /etc/shells
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High minor
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-27 15:22 UTC by Florian Blümel
Modified: 2003-07-30 16:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Blümel 2003-07-27 15:22:58 UTC
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.
Comment 1 Nick Hadaway 2003-07-30 13:01:16 UTC
I don't see where docs tell you to add /usr/jail to /etc/shells?
Comment 2 Florian Blümel 2003-07-30 13:12:28 UTC
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 
Comment 3 Florian Blümel 2003-07-30 13:15:52 UTC
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 
Comment 4 Florian Blümel 2003-07-30 13:42:36 UTC
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. 
Comment 5 Florian Blümel 2003-07-30 13:52:30 UTC
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. 
Comment 6 Nick Hadaway 2003-07-30 16:47:21 UTC
I have added a patch to the build in portage.  Thanks for noticing this :)