Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 177722 - sys-apps/baselayout: /etc/init.d/urandom script must respect size of random pool
Summary: sys-apps/baselayout: /etc/init.d/urandom script must respect size of random pool
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2007-05-08 21:12 UTC by Yaroslav Isakov
Modified: 2007-05-14 15:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
urandom.patch (urandom.patch,1.22 KB, patch)
2007-05-08 21:14 UTC, Yaroslav Isakov
Details | Diff
urandom.patch (urandom.patch,1.21 KB, patch)
2007-05-10 21:49 UTC, Yaroslav Isakov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yaroslav Isakov 2007-05-08 21:12:42 UTC
Hello, recently I found the option to increase size of random pool in hardened-sources. But /etc/init.d/urandom doesn't respect this modification and saved only standard 4096 bits (it's 16384 with this option). So I modified /etc/init.d/urandom to be more flexible. Because I'm not a shell programmer, it needs sys-devel/bc (bash can do math internally, but I see that current policy is NO_BASH!, so bc dep).
Comment 1 Yaroslav Isakov 2007-05-08 21:14:52 UTC
Created attachment 118629 [details, diff]
urandom.patch

patch for urandom
Comment 2 SpanKY gentoo-dev 2007-05-08 23:28:46 UTC
ugh, dont use bc ... that isnt a required utility in Gentoo

just use shell to do math
Comment 3 Yaroslav Isakov 2007-05-09 20:55:18 UTC
Unfortunately, I know how to do this only with bash:
declare -i TMP_COUNT=$TMP_POOLSIZE/4096
Comment 4 Roy Marples (RETIRED) gentoo-dev 2007-05-09 22:05:43 UTC
(In reply to comment #3)
> Unfortunately, I know how to do this only with bash:
> declare -i TMP_COUNT=$TMP_POOLSIZE/4096
> 

TMP_COUNT=$((${TMP_POOLSIZE} / 4096))
Comment 5 Yaroslav Isakov 2007-05-10 21:49:00 UTC
Created attachment 118811 [details, diff]
urandom.patch

Thanks for help, and this is new "NO-BASH" patch
Comment 6 Roy Marples (RETIRED) gentoo-dev 2007-05-11 10:34:28 UTC
Good enough, I've modified it a little more and it's in our svn trunk.
Comment 7 Yaroslav Isakov 2007-05-11 20:41:34 UTC
Thanks
Comment 8 Roy Marples (RETIRED) gentoo-dev 2007-05-14 15:17:18 UTC
Fixed in baselayout-2.0.0_alpha3