(krb5_ticket_get_authorization_data_type): add error strings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13708 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -110,12 +110,16 @@ krb5_ticket_get_authorization_data_type(krb5_context context,
|
|||||||
data->data = NULL;
|
data->data = NULL;
|
||||||
|
|
||||||
ad = ticket->ticket.authorization_data;
|
ad = ticket->ticket.authorization_data;
|
||||||
if (ad == NULL)
|
if (ad == NULL) {
|
||||||
|
krb5_set_error_string(context, "Ticket have not authorization data");
|
||||||
return ENOENT; /* XXX */
|
return ENOENT; /* XXX */
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < ad->len; i++) {
|
for (i = 0; i < ad->len; i++) {
|
||||||
if (ad->val[i].ad_type == type)
|
if (ad->val[i].ad_type == type)
|
||||||
return copy_octet_string(&ad->val[i].ad_data, data);
|
return copy_octet_string(&ad->val[i].ad_data, data);
|
||||||
}
|
}
|
||||||
|
krb5_set_error_string(context, "Ticket have not authorization "
|
||||||
|
"data of type %d", type);
|
||||||
return ENOENT; /* XXX */
|
return ENOENT; /* XXX */
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user