Revision 24037,
1.2 KB
checked in by broder, 15 years ago
(diff) |
In ssh-server-config, conditionalize the no tickets/tokens warning
based on DEBATHENA_HOME_TYPE rather than if the user is nonlocal, be
sure to always print errors to stderr, and only print the messages
during an interactive session.
Patch by Jessica Hamrick <jhamrick@mit.edu>
|
Line | |
---|
1 | # Warn the user if they log in without tickets or tokens |
---|
2 | |
---|
3 | # Check to make sure the user does not have a local account |
---|
4 | if ("$DEBATHENA_HOME_TYPE" == "afs") then |
---|
5 | # Check to make sure the logon is interactive |
---|
6 | if ($?prompt) then |
---|
7 | set tickets="" |
---|
8 | set tokens="" |
---|
9 | |
---|
10 | # Check for tickets |
---|
11 | klist -s |
---|
12 | if ("$?" == 0) then |
---|
13 | set tickets="yes" |
---|
14 | endif |
---|
15 | |
---|
16 | # Check for tokens |
---|
17 | tokens | grep -q 'athena\.mit\.edu' |
---|
18 | if ("$?" == 0) then |
---|
19 | set tokens="yes" |
---|
20 | endif |
---|
21 | |
---|
22 | if ("$tokens" != "yes" && "$tickets" != "yes" && ! -r ~/.cshrc) then |
---|
23 | echo "WARNING: You have no valid Kerberos tickets and no valid AFS tokens." >/dev/stderr |
---|
24 | echo "See http://debathena.mit.edu/ssh" >/dev/stderr |
---|
25 | else if ("$tokens" != "yes" && ! -r ~/.cshrc) then |
---|
26 | echo "WARNING: You have no valid AFS tokens." >/dev/stderr |
---|
27 | echo "See http://debathena.mit.edu/ssh" >/dev/stderr |
---|
28 | else if ("$tickets" != "yes") then |
---|
29 | echo "WARNING: You have no valid Kerberos tickets." >/dev/stderr |
---|
30 | echo "See http://debathena.mit.edu/ssh" >/dev/stderr |
---|
31 | endif |
---|
32 | endif |
---|
33 | endif |
---|
Note: See
TracBrowser
for help on using the repository browser.