FS#13205 - [PATCH] initscripts: better random-seed entropy and other things

Attached to Project: Arch Linux
Opened by Gerardo Exequiel Pozzi (djgera) - Wednesday, 11 February 2009, 15:31 GMT
Last edited by Thomas Bächler (brain0) - Wednesday, 11 February 2009, 21:10 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Architecture All
Severity Medium
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi,

Some points:

*** The random-seed file location to be more "FHS compliant" is better to put in /var/lib/misc/random-seed (Variable state information, that persist after reboot) than the /var/run/random-seed (Run-time variable data, that not necessary persists after reboot) for example with /var/run mounted as TMPFS. (this is the _principal_ reason of why created this patch)

** The random-seed file permision should be "0600" not "0644" (OK, actually this file is removed in rc.sysinit at "the clean" step.

* The size of random-seed acording to random(4) manpage should be the size specified in "/proc/sys/kernel/random/poolsize" in other case 512 bytes.

The patch is attached ;)
This task depends upon

Closed by  Thomas Bächler (brain0)
Wednesday, 11 February 2009, 21:10 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in git.
Comment by Aaron Griffin (phrakture) - Wednesday, 11 February 2009, 16:30 GMT
Another good one - thanks Gerardo.

Thomas, opinions? I haven't looked at the patch yet, but the explanation seems solid.
Comment by Thomas Bächler (brain0) - Wednesday, 11 February 2009, 16:50 GMT
Good stuff, I am only confused by this line:
+[ -r $POOL_FILE ] && POOL_SIZE=$(/bin/cat $POOL_FILE) || POOL_SIZE=512
Sometimes constructs containing both && and || behaved weird to me (now that I think about it, it should be okay the way you wrote it). For more readability, please use if/then/else at this point.

Furthermore, if you want credit for your patch in the logs, please resend it as a git-formatted patch against http://projects.archlinux.org/?p=initscripts.git;a=summary
Comment by Gerardo Exequiel Pozzi (djgera) - Wednesday, 11 February 2009, 18:00 GMT
Ok, i changed the "&&" and "||" boolean ops to if/then/else construcs :)

No problem for credits, commit without it, thanks ;)

Thanks for applying it. :D
Comment by Thomas Bächler (brain0) - Wednesday, 11 February 2009, 21:09 GMT

Loading...