diff options
author | joerg <joerg@FreeBSD.org> | 1995-07-08 11:11:23 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1995-07-08 11:11:23 +0000 |
commit | edb68238d81d91f89fe994bba7d75d21a6737ab2 (patch) | |
tree | e5244017f54f9efa716d98efb7786a2b0b38ec73 | |
parent | 41c6a8c88d64153ac36d8abf612203064a852ad6 (diff) | |
download | FreeBSD-src-edb68238d81d91f89fe994bba7d75d21a6737ab2.zip FreeBSD-src-edb68238d81d91f89fe994bba7d75d21a6737ab2.tar.gz |
Correct my last fix regarding the "Don't login..." message; plain csh
is too stupid to report anything about ARGV[0], so we will always
complain there, even for the "su -" case. The fix worked for tcsh
however.
-rw-r--r-- | etc/root/dot.login | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/etc/root/dot.login b/etc/root/dot.login index 0f85667..5966044 100644 --- a/etc/root/dot.login +++ b/etc/root/dot.login @@ -1,9 +1,14 @@ -# $Id: dot.login,v 1.6 1994/09/16 04:20:13 rgrimes Exp $ +# $Id: dot.login,v 1.7 1995/06/29 06:30:43 joerg Exp $ # tset -Q \?$TERM stty crt erase ^H umask 2 -if ("$0" != "-su") then - echo "Don't login as root, login as yourself an use the 'su' command" +# plain csh is too stupid to get any information on ARGV[0] back +if (! $?tcsh) then + echo "Don't login as root, login as yourself and use the 'su' command" +else + # for tcsh, check if we have been invoked by an "su -" + if ("$0" != "-su") \ + echo "Don't login as root, login as yourself and use the 'su' command" endif |