[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a bug in restricted bash mode?
From: |
Chet Ramey |
Subject: |
Re: a bug in restricted bash mode? |
Date: |
Mon, 14 May 2007 22:14:26 -0400 |
User-agent: |
Thunderbird 2.0.0.0 (Macintosh/20070326) |
Dawid Gołuński wrote:
> I think, the problem is connected with a bad argv[0] comparison. It is,
> when rbash is called directly from bash level, the argv[0] equals
> "rbash", and when rbash is called at login, argv[0] is
> equal to "-rbash". So i thought maybe there was something like this:
>
> if ( strcmp(argv[0],"rbash") != 0 ) enter_restricted_mode();
>
> there, in the source code. That would explain why bash doesnt enter
> restricted mode while run at the begining of a terminal session,
> i.e "rbash" != "-rbash".
>
>
> I've noticed this behavior on Slackware 9, and 11 systems. Bash
> version:
> GNU bash, version 2.05b.0(1)-release (i486-slackware-linux-gnu)
According to the changelogs, that was fixed in September, 2002. The
fix appeared in bash-3.0.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Live Strong. No day but today.
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/