[24447] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r24038 - trunk/debathena/config/ssh-server-config/debian

daemon@ATHENA.MIT.EDU (Evan Broder)
Thu Oct 1 17:50:37 2009

X-Barracuda-Envelope-From: broder@mit.edu
Date: Thu, 1 Oct 2009 17:50:26 -0400
From: Evan Broder <broder@MIT.EDU>
Message-Id: <200910012150.n91LoQkX019909@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: broder
Date: 2009-10-01 17:50:26 -0400 (Thu, 01 Oct 2009)
New Revision: 24038

Modified:
   trunk/debathena/config/ssh-server-config/debian/10-bash-kerberos-credentials-warn
   trunk/debathena/config/ssh-server-config/debian/10-csh-kerberos-credentials-warn
Log:
Miscellaneous, minor cleanups in shell-config.


Modified: trunk/debathena/config/ssh-server-config/debian/10-bash-kerberos-credentials-warn
===================================================================
--- trunk/debathena/config/ssh-server-config/debian/10-bash-kerberos-credentials-warn	2009-10-01 21:45:10 UTC (rev 24037)
+++ trunk/debathena/config/ssh-server-config/debian/10-bash-kerberos-credentials-warn	2009-10-01 21:50:26 UTC (rev 24038)
@@ -1,31 +1,30 @@
-# If a user logs in without tickets and tokens, display a warning message to let them know
+# If a user logs in without tickets and tokens, display a warning
+# message to let them know
 
-# Check to make sure the user does not have a local account
-if [ "$DEBATHENA_HOME_TYPE" == "afs" ]; then
-    # Check to make sure it's an interactive logon
-    if [ "$PS1" ]; then
-        tickets=
-        tokens=
+# Check to make sure the user does not have a local account, and that
+# it's an interactive login
+if [ "$DEBATHENA_HOME_TYPE" = "afs" ] && [ "$PS1" ]; then
+    tickets=
+    tokens=
 
-        # Check for tokens
-        if tokens | grep -q 'athena\.mit\.edu'; then
-            tokens="yes"
-        fi
+    # Check for tokens
+    if tokens | grep -q 'athena\.mit\.edu'; then
+        tokens="yes"
+    fi
 
-        # Check for tickets
-        if klist -s; then
-            tickets="yes"
-        fi
+    # Check for tickets
+    if klist -s; then
+        tickets="yes"
+    fi
 
-        if [ -z "$tokens" ] && [ -z "$tickets" ] && [ ! -r ~/.bashrc ]; then
-            echo "WARNING: You have no valid Kerberos tickets and no valid AFS tokens." >&2
-            echo "See http://debathena.mit.edu/ssh" >&2
-        elif [ -z "$tokens" ] && [ ! -r ~/.bashrc ]; then
-            echo "WARNING: You have no valid AFS tokens." >&2
-            echo "See http://debathena.mit.edu/ssh" >&2
-        elif [ -z "$tickets" ]; then
-            echo "WARNING: You have no valid Kerberos tickets." >&2
-            echo "See http://debathena.mit.edu/ssh" >&2
-        fi
+    if [ -z "$tokens" ] && [ -z "$tickets" ] && [ ! -r ~/.bashrc ]; then
+        echo "WARNING: You have no valid Kerberos tickets and no valid AFS tokens." >&2
+        echo "See http://debathena.mit.edu/ssh" >&2
+    elif [ -z "$tokens" ] && [ ! -r ~/.bashrc ]; then
+        echo "WARNING: You have no valid AFS tokens." >&2
+        echo "See http://debathena.mit.edu/ssh" >&2
+    elif [ -z "$tickets" ]; then
+        echo "WARNING: You have no valid Kerberos tickets." >&2
+        echo "See http://debathena.mit.edu/ssh" >&2
     fi
 fi

Modified: trunk/debathena/config/ssh-server-config/debian/10-csh-kerberos-credentials-warn
===================================================================
--- trunk/debathena/config/ssh-server-config/debian/10-csh-kerberos-credentials-warn	2009-10-01 21:45:10 UTC (rev 24037)
+++ trunk/debathena/config/ssh-server-config/debian/10-csh-kerberos-credentials-warn	2009-10-01 21:50:26 UTC (rev 24038)
@@ -1,33 +1,31 @@
 # Warn the user if they log in without tickets or tokens
 
-# Check to make sure the user does not have a local account
-if ("$DEBATHENA_HOME_TYPE" == "afs") then
-    # Check to make sure the logon is interactive
-    if ($?prompt) then
-        set tickets=""
-        set tokens=""
+# Check to make sure the user does not have a local account, and that
+# it's an interactive login
+if ("$DEBATHENA_HOME_TYPE" == "afs" && $?prompt) then
+    set tickets=""
+    set tokens=""
 
-        # Check for tickets
-        klist -s
-        if ("$?" == 0) then
-            set tickets="yes"
-        endif
+    # Check for tickets
+    klist -s
+    if ("$?" == 0) then
+        set tickets="yes"
+    endif
 
-        # Check for tokens
-        tokens | grep -q 'athena\.mit\.edu'
-        if ("$?" == 0) then
-            set tokens="yes"
-        endif
+    # Check for tokens
+    tokens | grep -q 'athena\.mit\.edu'
+    if ("$?" == 0) then
+        set tokens="yes"
+    endif
 
-        if ("$tokens" != "yes" && "$tickets" != "yes" && ! -r ~/.cshrc) then
-            echo "WARNING: You have no valid Kerberos tickets and no valid AFS tokens." >/dev/stderr
-            echo "See http://debathena.mit.edu/ssh" >/dev/stderr
-        else if ("$tokens" != "yes" && ! -r ~/.cshrc) then
-            echo "WARNING: You have no valid AFS tokens." >/dev/stderr
-            echo "See http://debathena.mit.edu/ssh" >/dev/stderr
-        else if ("$tickets" != "yes") then
-            echo "WARNING: You have no valid Kerberos tickets." >/dev/stderr
-            echo "See http://debathena.mit.edu/ssh" >/dev/stderr
-        endif
+    if ("$tokens" != "yes" && "$tickets" != "yes" && ! -r ~/.cshrc) then
+        echo "WARNING: You have no valid Kerberos tickets and no valid AFS tokens." >/dev/stderr
+        echo "See http://debathena.mit.edu/ssh" >/dev/stderr
+    else if ("$tokens" != "yes" && ! -r ~/.cshrc) then
+        echo "WARNING: You have no valid AFS tokens." >/dev/stderr
+        echo "See http://debathena.mit.edu/ssh" >/dev/stderr
+    else if ("$tickets" != "yes") then
+        echo "WARNING: You have no valid Kerberos tickets." >/dev/stderr
+        echo "See http://debathena.mit.edu/ssh" >/dev/stderr
     endif
 endif


home help back first fref pref prev next nref lref last post