b3a22ee1d91aa4ed1544475be16ec2b7cf886180 |
|
17-Aug-2016 |
Jakub Hrozek <jhrozek@redhat.com> |
UTIL: Use sss_atomic_read_s in generate_csprng_buffer
There was a bug in generate_csprng_buffer() where if we read the exact
amount of bytes from /dev/urandom, we would always return EIO. Instead,
let's reuse the existing code from sss_atomic_read_s() which fixes this
bug and reduces code duplication.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Reviewed-by: Fabiano Fidêncio <fabiano@fidencio.org> |