diff options
author | Jeff Layton <jlayton@redhat.com> | 2009-03-23 08:12:37 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2009-03-23 08:12:37 -0400 |
commit | 38062464a09868ff579b3c3c0b43fcd550ea3c61 (patch) | |
tree | 2786b9e74b96eb6eb95df50d28eb8f8a2987811f /utils/gssd/krb5_util.h | |
parent | 7f1f9985cf510b087e7a817597094acba9143795 (diff) | |
download | nfs-utils-38062464a09868ff579b3c3c0b43fcd550ea3c61.tar.gz nfs-utils-38062464a09868ff579b3c3c0b43fcd550ea3c61.tar.xz nfs-utils-38062464a09868ff579b3c3c0b43fcd550ea3c61.zip |
gssd: free buffer allocated by gssd_k5_err_msg
There's no way for the caller of gssd_k5_err_msg to know whether to free
the string it returns. It can call krb5_get_error_message which returns
a string that must be freed via krb5_free_error_string. The other ways
that it can return a string require that the memory not be freed.
Deal with this by copying the string to a new buffer in all cases. Then
we can properly free the string allocated by krb5_get_error_message.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/gssd/krb5_util.h')
-rw-r--r-- | utils/gssd/krb5_util.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/utils/gssd/krb5_util.h b/utils/gssd/krb5_util.h index 7d808f5..3d39300 100644 --- a/utils/gssd/krb5_util.h +++ b/utils/gssd/krb5_util.h @@ -31,8 +31,7 @@ void gssd_setup_krb5_machine_gss_ccache(char *servername); void gssd_destroy_krb5_machine_creds(void); int gssd_refresh_krb5_machine_credential(char *hostname, struct gssd_k5_kt_princ *ple); -const char * -gssd_k5_err_msg(krb5_context context, krb5_error_code code); +char *gssd_k5_err_msg(krb5_context context, krb5_error_code code); void gssd_k5_get_default_realm(char **def_realm); #ifdef HAVE_SET_ALLOWABLE_ENCTYPES |