From 13a0013f55e9bea8384234f5caa1a0b444749daf Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Wed, 9 May 2012 17:40:38 +0000 Subject: Add API to interpret changepw result strings Active Directory returns structured policy information in the nominally UTF-8 result string field of a password change reply. Add a new API krb5_chpw_message() to convert a result string into a displayable message, interpreting policy information if present. Patch from stefw@gnome.org with changes. ticket: 7128 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25857 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/krb5/krb5.hin | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/include') diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin index c267622db..741477caf 100644 --- a/src/include/krb5/krb5.hin +++ b/src/include/krb5/krb5.hin @@ -4962,6 +4962,32 @@ krb5_set_password_using_ccache(krb5_context context, krb5_ccache ccache, int *result_code, krb5_data *result_code_string, krb5_data *result_string); +/** + * Get a result message for changing or setting a password. + * + * @param [in] context Library context + * @param [in] server_string Data returned from the remote system + * @param [out] message_out A message displayable to the user + * + * This function processes the @a server_string returned in the @a + * result_string parameter of krb5_change_password(), krb5_set_password(), and + * related functions, and returns a displayable string. If @a server_string + * contains Active Directory structured policy information, it will be + * converted into human-readable text. + * + * Use krb5_free_string() to free @a message_out when it is no longer needed. + * + * @retval + * 0 Success + * @return + * Kerberos error codes + * + * @version First introduced in 1.11 + */ +krb5_error_code KRB5_CALLCONV +krb5_chpw_message(krb5_context context, const krb5_data *server_string, + char **message_out); + /** * Retrieve configuration profile from the context. * -- cgit