From 5377a43f0bc75560d5a22fb813b42ea6807cd630 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 2 Aug 2008 06:21:08 +0000 Subject: [PATCH] Rename and export random_string from cc_memory.c git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20596 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/k5-int.h | 2 ++ src/lib/krb5/ccache/cc_memory.c | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/include/k5-int.h b/src/include/k5-int.h index f48bd223d..4b0a0937e 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -1762,6 +1762,8 @@ krb5_error_code krb5int_generate_and_save_subkey (krb5_context, krb5_auth_context, krb5_keyblock * /* Old keyblock, not new! */); +krb5_error_code krb5int_random_string (krb5_context, char *, unsigned int); + /* set and change password helpers */ krb5_error_code krb5int_mk_chpw_req diff --git a/src/lib/krb5/ccache/cc_memory.c b/src/lib/krb5/ccache/cc_memory.c index 3427c7582..504dccb73 100644 --- a/src/lib/krb5/ccache/cc_memory.c +++ b/src/lib/krb5/ccache/cc_memory.c @@ -431,8 +431,6 @@ new_mcc_data (const char *name, krb5_mcc_data **dataptr) return 0; } -static krb5_error_code random_string (krb5_context, char *, unsigned int); - /* * Effects: * Creates a new file cred cache whose name is guaranteed to be @@ -473,7 +471,7 @@ krb5_mcc_generate_new (krb5_context context, krb5_ccache *id) while (1) { krb5_mcc_list_node *ptr; - random_string (context, uniquename, sizeof (uniquename)); + krb5int_random_string (context, uniquename, sizeof (uniquename)); for (ptr = mcc_head; ptr; ptr=ptr->next) { if (!strcmp(ptr->cache->name, uniquename)) { @@ -500,8 +498,8 @@ krb5_mcc_generate_new (krb5_context context, krb5_ccache *id) * This algorithm was selected because it creates readable * random ccache names in a fixed size buffer. */ -static krb5_error_code -random_string (krb5_context context, char *string, unsigned int length) +krb5_error_code +krb5int_random_string (krb5_context context, char *string, unsigned int length) { static const unsigned char charlist[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; -- 2.26.2