🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #268

Re: login should be a builtin

#268
From: Noah Friedman
Date: Sat, 08 Aug 1992 23:47
33 lines
1929 bytes
In article <1992Aug7Fr000428a.danj1@ihspa.att.com> danj1@ihspa.ATt.COM (Dan Jacobson) writes:
>login should be a builtin, because if jimmy, used to some other leading
>brands of shell, does
>bash$ login jenny
>as he turns over the terminal to jenny, and then later jenny logs out
>and walks away, jimmy's bash will be sitting there, so some baddie
>will take advantage of it, and then the whole school will hear some
>rumor that bash is a security hazard.  

   I used to feel this way too, but lately I've decided I don't like for
shells to be that clever.  It's even worse for some shells to recognize
"newgrp" and do the same thing they do for login.  It's a misfeature in
those shells. 

>                                        Plus, two out of three selected
>big name shells do it:

   "If a million people do a foolish thing, it is still a foolish thing."  :-)

>Plus it's unreasonable to expect jimmy to memorize "'exec login' when
>under bash".

   If it's really that much of a problem, then I'd suggest putting the
following in /etc/profile:

        if [ -n "${PS1}" -a -n "${BASH_VERSION}" ]; then
           alias login='exec login'
        fi

But think about whether you really want to do this, instead of doing the
Right Thing and getting users to learn about how the shell behaves in the
first place.  If the users are lazy even after that, then they can make
their own aliases.
Technical Details
Message-ID: <FRIEDMAN.92Aug8194723@nutrimat.gnu.ai.mit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!friedman
References: <1992Aug7Fr000428a.danj1@ihspa.att.com>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.bash.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!friedman
From: friedman@gnu.ai.mit.edu (Noah Friedman)
Subject: Re: login should be a builtin
Message-ID: <FRIEDMAN.92Aug8194723@nutrimat.gnu.ai.mit.edu>
Sender: gnulists@ai.mit.edu
Organization: Free Software Foundation, 675 Mass Ave. Cambridge, MA 02139
References: <1992Aug7Fr000428a.danj1@ihspa.att.com>
Distribution: gnu
Date: Sat, 8 Aug 1992 23:47:23 GMT
Approved: bug-bash@prep.ai.mit.edu
Lines: 36