diff options
author | rjung <rjung@13f79535-47bb-0310-9956-ffa450edef68> | 2011-11-08 02:54:40 +0000 |
---|---|---|
committer | rjung <rjung@13f79535-47bb-0310-9956-ffa450edef68> | 2011-11-08 02:54:40 +0000 |
commit | efc62cf7d5c5835e9bc3fc7150a11c23c06eb45d (patch) | |
tree | 86b80ef0c483e8736799e16b6af545bcf0dd4dc0 /random | |
parent | 1c9e037dba01fcbd3c7e2227c39b9fe6b84f2e8d (diff) | |
download | libapr-efc62cf7d5c5835e9bc3fc7150a11c23c06eb45d.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.
Backport of r1198860 from trunk.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1199082 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'random')
-rw-r--r-- | random/unix/apr_random.c | 5 |
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); } |