summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorAlexandra Ellwood <lxs@mit.edu>2008-10-24 19:46:41 +0000
committerAlexandra Ellwood <lxs@mit.edu>2008-10-24 19:46:41 +0000
commit4d901a092a69a69be251131174166fc661d13633 (patch)
treedc1227f213605bc27561acdf4005b74df65f7b0b /src/include
parent9d3a0fa806297b18967f2108c637e65c6904987c (diff)
downloadkrb5-4d901a092a69a69be251131174166fc661d13633.tar.gz
krb5-4d901a092a69a69be251131174166fc661d13633.tar.xz
krb5-4d901a092a69a69be251131174166fc661d13633.zip
krb5_build_principal_va does not allocate krb5_principal
krb5_build_principal_va does not allocate the outer krb5_principal, making it useless for generating krb5_principals which can be freed with krb5_free_principal. Added krb5_build_principal_alloc_va which allocates the krb5_principal. Added krb5int_build_principal_alloc_va which is used by KIM to avoid code duplication. KIM's kim_identity_create_from_components takes the first component as an argument because principals with no components cannot be represented with the KIM UI. Modified KIM to use this new API. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20918 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
-rw-r--r--src/include/k5-int.h9
-rw-r--r--src/include/krb5/krb5.hin8
2 files changed, 16 insertions, 1 deletions
diff --git a/src/include/k5-int.h b/src/include/k5-int.h
index f05adecf3..cbc810e77 100644
--- a/src/include/k5-int.h
+++ b/src/include/k5-int.h
@@ -2518,6 +2518,15 @@ void KRB5_CALLCONV krb5_realm_iterator_free
void KRB5_CALLCONV krb5_free_realm_string
(krb5_context context, char *str);
+/* Internal principal function used by KIM to avoid code duplication */
+krb5_error_code KRB5_CALLCONV
+krb5int_build_principal_alloc_va(krb5_context context,
+ krb5_principal *princ,
+ unsigned int rlen,
+ const char *realm,
+ const char *first,
+ va_list ap);
+
/* Some data comparison and conversion functions. */
#if 0
static inline int data_cmp(krb5_data d1, krb5_data d2)
diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin
index 82e52ab52..62fd90df4 100644
--- a/src/include/krb5/krb5.hin
+++ b/src/include/krb5/krb5.hin
@@ -1599,9 +1599,15 @@ krb5_error_code KRB5_CALLCONV_C krb5_build_principal
__attribute__ ((sentinel))
#endif
;
-krb5_error_code KRB5_CALLCONV krb5_build_principal_va
+#if KRB5_DEPRECATED
+KRB5_ATTR_DEPRECATED krb5_error_code KRB5_CALLCONV krb5_build_principal_va
(krb5_context,
krb5_principal, unsigned int, const char *, va_list);
+#endif
+
+/* Version of krb5_build_principal_va which allocates krb5_principal_data */
+krb5_error_code KRB5_CALLCONV krb5_build_principal_alloc_va
+ (krb5_context, krb5_principal *, unsigned int, const char *, va_list);
krb5_error_code KRB5_CALLCONV krb5_425_conv_principal
(krb5_context,