Files
libiscsi/lib
Felipe Franciosi 41af44eba1 iscsi_create_context: call srand() only once
iscsi_create_context() calls srand() every time a new context is
generated. That practice is questionable, as the seed does not need to
change before each call to rand(). As a matter of fact, doing so defeats
the purpose of using rand() altogether. Furthermore, the current
implementation is not thread safe.

This improves ISID generation by using /dev/urandom (when available) as
a seed, and calling srand() only once. In case of errors, fallback to
using something similar to the previous implementation (albeit
thread-safe).

Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2018-10-05 18:10:07 +01:00
..
2017-11-29 10:07:44 -05:00
2018-04-30 18:11:05 -04:00
2017-11-29 10:07:44 -05:00
2017-11-29 10:07:44 -05:00
2017-11-29 10:07:44 -05:00
2017-11-25 17:03:01 +00:00
2017-11-29 10:07:44 -05:00
2017-11-25 17:12:38 +00:00