Comment 1 for bug 301225

Revision history for this message
Jilles Tjoelker (jilles) wrote :

I think the real problem is in gdm here: if it wants to read the user's shell startup files, it should do so using the user's login shell, not /bin/sh. User shell startup files cannot be guaranteed to even parse in /bin/sh, and changing /bin/sh to make it work degrades sh -n for actual /bin/sh scripts.

As a workaround, use . or eval to pull in the extension-using code if the extensions are supported.

POSIX does not say whether it is allowed to define a function with the same name as a special builtin such as exit, but does say that it is impossible to call such a function. This is a feature as it makes sure that if something looks like a special builtin (after alias expansion), it is one. For example, unset cannot be overridden with a function, which allows using it to remove functions covering all other utilities.