summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2008-08-02 06:21:08 +0000
committerKen Raeburn <raeburn@mit.edu>2008-08-02 06:21:08 +0000
commit5377a43f0bc75560d5a22fb813b42ea6807cd630 (patch)
treed488e49d686eb15b09d14d7b1cb7e7e61e906593 /src
parenta8af625de76060fa020793e7e267150c1a43c1e0 (diff)
downloadkrb5-5377a43f0bc75560d5a22fb813b42ea6807cd630.tar.gz
krb5-5377a43f0bc75560d5a22fb813b42ea6807cd630.tar.xz
krb5-5377a43f0bc75560d5a22fb813b42ea6807cd630.zip
Rename and export random_string from cc_memory.c
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20596 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/include/k5-int.h2
-rw-r--r--src/lib/krb5/ccache/cc_memory.c8
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";