diff options
| author | Greg Hudson <ghudson@mit.edu> | 2012-05-10 17:34:07 +0000 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2012-05-10 17:34:07 +0000 |
| commit | f609e5caff410cc8f71db7d95b4da219541437db (patch) | |
| tree | 64f36d5aa7e394924b545737e0766e80981b1a35 /src/include | |
| parent | b9ff95a51ef11742abc9687a70b6d8324eda6803 (diff) | |
| download | krb5-f609e5caff410cc8f71db7d95b4da219541437db.tar.gz krb5-f609e5caff410cc8f71db7d95b4da219541437db.tar.xz krb5-f609e5caff410cc8f71db7d95b4da219541437db.zip | |
Rewrite krb5_parse_name
krb5_parse_name started out a bit unwieldy, and has become more so
with the introduction of flags. Rewrite it using two passes (allocate
and fill), each broken out into its own helper, and a wrapper which
handles the realm flags.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25861 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/krb5/krb5.hin | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin index f319136ec..284e6b327 100644 --- a/src/include/krb5/krb5.hin +++ b/src/include/krb5/krb5.hin @@ -3374,7 +3374,7 @@ krb5_rd_priv(krb5_context context, krb5_auth_context auth_context, * * @param [in] context Library context * @param [in] name String representation of a principal name - * @param [out] nprincipal Principal + * @param [out] principal_out New principal * * Convert a string representation of a principal name to a krb5_principal * structure. @@ -3393,7 +3393,8 @@ krb5_rd_priv(krb5_context context, krb5_auth_context auth_context, * @note The realm in a Kerberos @a name cannot contain slash, colon, * or NULL characters. * - * Use krb5_free_principal() to free @a nprincipal when it is no longer needed. + * Use krb5_free_principal() to free @a principal_out when it is no longer + * needed. * * @retval * 0 Success @@ -3401,7 +3402,8 @@ krb5_rd_priv(krb5_context context, krb5_auth_context auth_context, * Kerberos error codes */ krb5_error_code KRB5_CALLCONV -krb5_parse_name(krb5_context context, const char *name, krb5_principal *nprincipal); +krb5_parse_name(krb5_context context, const char *name, + krb5_principal *principal_out); #define KRB5_PRINCIPAL_PARSE_NO_REALM 0x1 /**< Error if realm is present */ #define KRB5_PRINCIPAL_PARSE_REQUIRE_REALM 0x2 /**< Error if realm is not present */ @@ -3409,12 +3411,12 @@ krb5_parse_name(krb5_context context, const char *name, krb5_principal *nprincip enterprise principle */ /** - * Convert a string principal name to a krb5_principal with flags + * Convert a string principal name to a krb5_principal with flags. * * @param [in] context Library context * @param [in] name String representation of a principal name * @param [in] flags Flag - * @param [out] nprincipal Principal + * @param [out] principal_out New principal * * Similar to krb5_parse_name(), this function converts a single-string * representation of a principal name to a krb5_principal structure. @@ -3425,7 +3427,8 @@ krb5_parse_name(krb5_context context, const char *name, krb5_principal *nprincip * @li #KRB5_PRINCIPAL_PARSE_ENTERPRISE - create single-component enterprise * principal * - * Use krb5_free_principal() to free @a nprincipal when it is no longer needed. + * Use krb5_free_principal() to free @a principal_out when it is no longer + * needed. * * @retval * 0 Success @@ -3434,7 +3437,7 @@ krb5_parse_name(krb5_context context, const char *name, krb5_principal *nprincip */ krb5_error_code KRB5_CALLCONV krb5_parse_name_flags(krb5_context context, const char *name, - int flags, krb5_principal *nprincipal); + int flags, krb5_principal *principal_out); /** * Convert a krb5_principal structure to a string representation. |
