krb5_wrap: Improve smb_krb5_parse_name() documentation
authorAndreas Schneider <asn@samba.org>
Tue, 30 Aug 2016 12:13:43 +0000 (14:13 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 31 Aug 2016 18:59:17 +0000 (20:59 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/krb5_wrap/krb5_samba.c

index d1ca958d8a75f18a9e3eff40c74ad244eeab68ba..0cd20e7d008c3b37799e30b85bb3bd289e42dbc6 100644 (file)
@@ -434,13 +434,22 @@ bool unwrap_edata_ntstatus(TALLOC_CTX *mem_ctx,
 }
 
 
-/**************************************************************
- krb5_parse_name that takes a UNIX charset.
-**************************************************************/
-
+/**
+ * @brief Convert a string principal name to a Kerberos principal.
+ *
+ * @param[in]  context  The library context
+ *
+ * @param[in]  name     The principal as a unix charset string.
+ *
+ * @param[out] principal The newly allocated principal.
+ *
+ * Use krb5_free_principal() to free a principal when it is no longer needed.
+ *
+ * @return 0 on success, a Kerberos error code otherwise.
+ */
 krb5_error_code smb_krb5_parse_name(krb5_context context,
-                               const char *name, /* in unix charset */
-                               krb5_principal *principal)
+                                   const char *name,
+                                   krb5_principal *principal)
 {
        krb5_error_code ret;
        char *utf8_name;