summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pw/pw_user.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c
index a2d5e78..a001e3e 100644
--- a/pw/pw_user.c
+++ b/pw/pw_user.c
@@ -1058,9 +1058,8 @@ pw_getrand(u_char *buf, int len)
{
int i;
- srandomdev();
for (i = 0; i < len; i++) {
- unsigned long val = random();
+ unsigned long val = arc4random();
/* Use all bits in the random value */
buf[i]=(u_char)((val >> 24) ^ (val >> 16) ^ (val >> 8) ^ val);
}