b3a22ee UTIL: Use sss_atomic_read_s in generate_csprng_buffer

Authored and Committed by jhrozek 7 years ago
    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>
    
        
file modified
+2 -0
file modified
+5 -24