Slackware-12 still fails three tests

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Fri Aug 20 21:04:27 EST 2010


On Fri, 20 Aug 2010, Darren Tucker wrote:

> It can't be independent of the user's environment because sshd uses
> the user's shell (as retrieved by getpwnam) to execute commands.
> What we maybe could do is a simple test to see if the shell is in
> fact clean, something like:
>
> if [[ `$SHELL -c true 2>&1` != "" ]]; then
>   echo fix yer shell
>   exit 1
> fi
>
> The trick with that is finding out the user's shell in a portable fashion.
> Maybe even get configure to run a little program that just does
> getpwuid(getuid()).

Or maybe even:

if [ "$($SHELL -c : 2>&1)" ]; then
	echo fix yer shell
	exit 1
fi

Not all shells set a SHELL env variable, and in some more complex
circumstances SHELL may not even reflect reality.


Cheers,

-- 
Cristian


More information about the openssh-unix-dev mailing list