summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-05-09 17:40:38 +0000
committerGreg Hudson <ghudson@mit.edu>2012-05-09 17:40:38 +0000
commit13a0013f55e9bea8384234f5caa1a0b444749daf (patch)
tree421085bed0a911b9a5de9ea06fbd401f37d5904b /src/include
parentc250f6743a623ab5086c56324060ebf99c740379 (diff)
downloadkrb5-13a0013f55e9bea8384234f5caa1a0b444749daf.tar.gz
krb5-13a0013f55e9bea8384234f5caa1a0b444749daf.tar.xz
krb5-13a0013f55e9bea8384234f5caa1a0b444749daf.zip
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
Diffstat (limited to 'src/include')
-rw-r--r--src/include/krb5/krb5.hin26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin
index c267622dbb..741477caf8 100644
--- a/src/include/krb5/krb5.hin
+++ b/src/include/krb5/krb5.hin
@@ -4963,6 +4963,32 @@ krb5_set_password_using_ccache(krb5_context context, krb5_ccache ccache,
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.
*
* @param [in] context Library context