From Bugzilla Helper: User-Agent: Mozilla/5.0 Galeon/1.2.0 (X11; Linux i686; U;) Gecko/20020312 Description of problem: Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. useradd -s /bin/zsh user 2. ssh user@localhost Actual Results: [root@confiote ~]# ssh anvil@gruyere anvil@gruyere's password: Last login: Mon Apr 1 22:01:40 2002 mc () { mkdir -p $HOME/.mc/tmp 2> /dev/null chmod 700 $HOME/.mc/tmp MC=$HOME/.mc/tmp/mc-$$ /usr/bin/mc -P "$@" > "$MC" cd "`cat $MC`" /bin/rm -f "$MC" unset MC } [anvil@gruyere ~]# Expected Results: Should not see the mc function. Additional info: If you want to test with my zsh configuration you can download it at : http://confiote.ath.cx/~anvil/config/
I also see this problem using zsh. My solutions was to remove the mc packages.
Removing the mc package is clearly not the "Right" fix here.... The problem is that mc.sh uses export -f to export the shell function into the environment. zsh's export doesn't support this, even if you wrap invocation of /etc/profile.d/*.sh in emulate bash. Perhaps that's a zsh bug. As it is extremely unlikely that anyone with zsh as a login shell actually uses mc, I'd suggest the workaround of not invoking export -f mc if $SHELL is not /bin/bash (or, alternatively, if $SHELL is /bin/zsh, but I think the former is preferable since most users who are sophisticated enough to change their shell won't use a file manager and just checking for /bin/zsh may still leave this problem around for some users with other bourne-shell like shells that aren't bash). Another possible solution would be to somehow get zsh to deal with export -f, but as far as I can tell, zsh doesn't have any facility for exporting shell functions into the environment. (It has shell function autoloading, etc.)
This is fixed in latest mc 4.5.55-3