From 056224c32fab192f8885dc6fde3b3a47a7cc1b18 Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Mon, 21 Oct 2013 08:32:11 -0700 Subject: [PATCH] more comments about how useful krb5_generate_random_block() is --- lib/krb5/crypto-rand.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/krb5/crypto-rand.c b/lib/krb5/crypto-rand.c index af22633e1..9ae550b06 100644 --- a/lib/krb5/crypto-rand.c +++ b/lib/krb5/crypto-rand.c @@ -142,6 +142,12 @@ krb5_generate_random(void *buf, size_t len) * * This function can NOT fail, instead it will abort() and program will crash. * + * If this function is called after a successful krb5_init_context(), + * the chance of it failing is low due to that krb5_init_context() + * pulls out some random, and quite commonly the randomness sources + * will not fail once it have started to produce good output, + * /dev/urandom behavies that way. + * * @param buf a buffer to fill with randomness * @param len length of memory that buf points to. * -- 2.11.4.GIT