summaryrefslogtreecommitdiff
path: root/random
diff options
context:
space:
mode:
authorSander Temme <sctemme@apache.org>2011-11-07 18:29:46 +0000
committerSander Temme <sctemme@apache.org>2011-11-07 18:29:46 +0000
commit72062d84633b8996646a83c6c254cfed8455c90a (patch)
tree4197f814638b31bd8cbaea61c1a1cb15ccd3a743 /random
parent8ec57c2423fd2d4847293a4651b67126bac63f6e (diff)
downloadapr-72062d84633b8996646a83c6c254cfed8455c90a.tar.gz
Clarify what happens to the proc structure used by apr_fork().
Set the proc->pid field to the pid of the newly created child. Note that a mere pid value provides little entropy to mix into the child random pool. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1198860 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'random')
-rw-r--r--random/unix/apr_random.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/random/unix/apr_random.c b/random/unix/apr_random.c
index c6d671c6b..852cfd6e3 100644
--- a/random/unix/apr_random.c
+++ b/random/unix/apr_random.c
@@ -159,6 +159,11 @@ APR_DECLARE(void) apr_random_after_fork(apr_proc_t *proc)
apr_random_t *r;
for (r = all_random; r; r = r->next)
+ /*
+ * XXX Note: the pid does not provide sufficient entropy to
+ * actually call this secure. See Ben's paper referenced at
+ * the top of this file.
+ */
mixer(r,proc->pid);
}