(krb5_sendauth): return the error in `ret_error' iff != NULL
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5308 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 1998 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1997, 1998, 1999 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -78,7 +78,7 @@ krb5_sendauth(krb5_context context,
|
|||||||
krb5_data *in_data,
|
krb5_data *in_data,
|
||||||
krb5_creds *in_creds,
|
krb5_creds *in_creds,
|
||||||
krb5_ccache ccache,
|
krb5_ccache ccache,
|
||||||
/*krb5_error*/ void **error,
|
krb5_error **ret_error,
|
||||||
krb5_ap_rep_enc_part **rep_result,
|
krb5_ap_rep_enc_part **rep_result,
|
||||||
krb5_creds **out_creds)
|
krb5_creds **out_creds)
|
||||||
{
|
{
|
||||||
@@ -165,7 +165,16 @@ krb5_sendauth(krb5_context context,
|
|||||||
ret = krb5_rd_error (context, &error_data, &error);
|
ret = krb5_rd_error (context, &error_data, &error);
|
||||||
krb5_data_free (&error_data);
|
krb5_data_free (&error_data);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
|
if (ret_error != NULL) {
|
||||||
|
*ret_error = malloc (sizeof(krb5_error));
|
||||||
|
if (*ret_error == NULL) {
|
||||||
free_KRB_ERROR(&error);
|
free_KRB_ERROR(&error);
|
||||||
|
} else {
|
||||||
|
**ret_error = error;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
free_KRB_ERROR(&error);
|
||||||
|
}
|
||||||
return error.error_code;
|
return error.error_code;
|
||||||
} else
|
} else
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user