version 1.18, 2000/09/07 20:27:49 |
version 1.19, 2000/10/03 18:03:02 |
|
|
{ |
{ |
CREDENTIALS creds; |
CREDENTIALS creds; |
|
|
|
if (pw == NULL) |
|
goto auth_kerberos_tgt_failure; |
if (!radix_to_creds(string, &creds)) { |
if (!radix_to_creds(string, &creds)) { |
log("Protocol error decoding Kerberos V4 tgt"); |
log("Protocol error decoding Kerberos V4 tgt"); |
packet_send_debug("Protocol error decoding Kerberos V4 tgt"); |
packet_send_debug("Protocol error decoding Kerberos V4 tgt"); |
|
|
auth_afs_token(struct passwd *pw, const char *token_string) |
auth_afs_token(struct passwd *pw, const char *token_string) |
{ |
{ |
CREDENTIALS creds; |
CREDENTIALS creds; |
uid_t uid = pw->pw_uid; |
uid_t uid; |
|
|
|
if (pw == NULL) { |
|
/* XXX fake protocol error */ |
|
packet_send_debug("Protocol error decoding AFS token"); |
|
packet_start(SSH_SMSG_FAILURE); |
|
packet_send(); |
|
packet_write_wait(); |
|
return 0; |
|
} |
if (!radix_to_creds(token_string, &creds)) { |
if (!radix_to_creds(token_string, &creds)) { |
log("Protocol error decoding AFS token"); |
log("Protocol error decoding AFS token"); |
packet_send_debug("Protocol error decoding AFS token"); |
packet_send_debug("Protocol error decoding AFS token"); |
|
|
|
|
if (strncmp(creds.pname, "AFS ID ", 7) == 0) |
if (strncmp(creds.pname, "AFS ID ", 7) == 0) |
uid = atoi(creds.pname + 7); |
uid = atoi(creds.pname + 7); |
|
else |
|
uid = pw->pw_uid; |
|
|
if (kafs_settoken(creds.realm, uid, &creds)) { |
if (kafs_settoken(creds.realm, uid, &creds)) { |
log("AFS token (%s@%s) rejected for %s", creds.pname, creds.realm, |
log("AFS token (%s@%s) rejected for %s", creds.pname, creds.realm, |