* grub-core/osdep/basic/random.c: New file. Abort on an attempt to

get random when no RNG is available.
	* grub-core/osdep/random.c: Use basic/random.c on OS out of whitelist.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-10-08 21:28:14 +02:00
parent acbbe5cbad
commit b102ce6909
4 changed files with 53 additions and 6 deletions

View file

@ -33,11 +33,6 @@
int
grub_get_random (void *out, grub_size_t len)
{
#if ! defined (__linux__) && ! defined (__FreeBSD__) && ! defined (__FreeBSD_kernel__) && ! defined (__OpenBSD__) && !defined (__GNU__) && ! defined (_WIN32) && !defined(__CYGWIN__) && !defined (__NetBSD__) && !defined (__APPLE__) && !defined(__sun__)
/* TRANSLATORS: The generator might still be secure just GRUB isn't sure about it. */
printf ("%s", _("WARNING: your random generator isn't known to be secure\n"));
#warning "your random generator isn't known to be secure"
#endif
FILE *f;
size_t rd;