Reply KRB5KRB_ERR_RESPONSE_TOO_BIG for too large packets when using
datagram based transports. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19163 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1202,7 +1202,8 @@ tgs_build_reply(krb5_context context,
|
|||||||
const char *from,
|
const char *from,
|
||||||
const char **e_text,
|
const char **e_text,
|
||||||
AuthorizationData *auth_data,
|
AuthorizationData *auth_data,
|
||||||
const struct sockaddr *from_addr)
|
const struct sockaddr *from_addr,
|
||||||
|
int datagram_reply)
|
||||||
{
|
{
|
||||||
krb5_error_code ret;
|
krb5_error_code ret;
|
||||||
krb5_principal cp = NULL, sp = NULL;
|
krb5_principal cp = NULL, sp = NULL;
|
||||||
@@ -1683,7 +1684,8 @@ _kdc_tgs_rep(krb5_context context,
|
|||||||
KDC_REQ *req,
|
KDC_REQ *req,
|
||||||
krb5_data *data,
|
krb5_data *data,
|
||||||
const char *from,
|
const char *from,
|
||||||
struct sockaddr *from_addr)
|
struct sockaddr *from_addr,
|
||||||
|
int datagram_reply)
|
||||||
{
|
{
|
||||||
AuthorizationData *auth_data = NULL;
|
AuthorizationData *auth_data = NULL;
|
||||||
krb5_error_code ret;
|
krb5_error_code ret;
|
||||||
@@ -1740,13 +1742,21 @@ _kdc_tgs_rep(krb5_context context,
|
|||||||
from,
|
from,
|
||||||
&e_text,
|
&e_text,
|
||||||
auth_data,
|
auth_data,
|
||||||
from_addr);
|
from_addr,
|
||||||
|
datagram_reply);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
kdc_log(context, config, 0,
|
kdc_log(context, config, 0,
|
||||||
"Failed building TGS-REP to %s", from);
|
"Failed building TGS-REP to %s", from);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* */
|
||||||
|
if (datagram_reply && data->length > config->max_datagram_reply_length) {
|
||||||
|
krb5_data_free(data);
|
||||||
|
ret = KRB5KRB_ERR_RESPONSE_TOO_BIG;
|
||||||
|
e_text = "Reply packet too large";
|
||||||
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if(ret && data->data == NULL){
|
if(ret && data->data == NULL){
|
||||||
krb5_mk_error(context,
|
krb5_mk_error(context,
|
||||||
|
|||||||
Reference in New Issue
Block a user