drop v4
This commit is contained in:
@@ -130,23 +130,9 @@ v5_convert(krb5_context context, krb5_ccache id,
|
||||
if (strcasecmp(val, "local") == 0 ||
|
||||
strcasecmp(val, "2b") == 0)
|
||||
ret = v5_to_kt(cred, uid, kt, 1);
|
||||
else if(strcasecmp(val, "yes") == 0 ||
|
||||
strcasecmp(val, "true") == 0 ||
|
||||
atoi(val)) {
|
||||
struct credentials cred4;
|
||||
|
||||
if (id == NULL)
|
||||
ret = krb524_convert_creds_kdc(context, cred, &cred4);
|
||||
else
|
||||
ret = krb524_convert_creds_kdc_ccache(context, id, cred, &cred4);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = _kafs_v4_to_kt(&cred4, uid, kt);
|
||||
} else
|
||||
else
|
||||
ret = v5_to_kt(cred, uid, kt, 0);
|
||||
|
||||
out:
|
||||
free(val);
|
||||
return ret;
|
||||
}
|
||||
|
@@ -139,35 +139,6 @@ _kafs_fixup_viceid(struct ClearToken *ct, uid_t uid)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
_kafs_v4_to_kt(CREDENTIALS *c, uid_t uid, struct kafs_token *kt)
|
||||
{
|
||||
kt->ticket = NULL;
|
||||
|
||||
if (c->ticket_st.length > MAX_KTXT_LEN)
|
||||
return EINVAL;
|
||||
|
||||
kt->ticket = malloc(c->ticket_st.length);
|
||||
if (kt->ticket == NULL)
|
||||
return ENOMEM;
|
||||
kt->ticket_len = c->ticket_st.length;
|
||||
memcpy(kt->ticket, c->ticket_st.dat, kt->ticket_len);
|
||||
|
||||
/*
|
||||
* Build a struct ClearToken
|
||||
*/
|
||||
kt->ct.AuthHandle = c->kvno;
|
||||
memcpy (kt->ct.HandShakeKey, c->session, sizeof(c->session));
|
||||
kt->ct.ViceId = uid;
|
||||
kt->ct.BeginTimestamp = c->issue_date;
|
||||
kt->ct.EndTimestamp = krb_life_to_time(c->issue_date, c->lifetime);
|
||||
|
||||
_kafs_fixup_viceid(&kt->ct, uid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Try to get a db-server for an AFS cell from a AFSDB record */
|
||||
|
||||
static int
|
||||
|
Reference in New Issue
Block a user