On Tue, Jan 28, 2014 at 12:27 PM, Lennart Poettering
<lenn...@poettering.net> wrote:
> On Mon, 27.01.14 20:17, Zbigniew Jędrzejewski-Szmek 
> (zbys...@kemper.freedesktop.org) wrote:

>> +        uint64_t tries = TMP_MAX;
>> +        int randfd, fd, i;
>> +
>> +        assert(streq(s, "XXXXXX"));
>> +
>> +        randfd = open("/dev/urandom", O_RDONLY);
>> +        if (randfd < 0)
>> +                return -ENOSYS;
>
> There's random_bytes() already, which is similar to this... It might
> make sense to use that here, maybe with an additional argument that
> tells it to never fallback to PRNG.

What it the point of all of this? Glibc uses gettimeofday or/and the
TSC for the random, in a retry loop. What problem is this patch
supposed to solve?

Kay
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to