summaryrefslogtreecommitdiffstats
path: root/kdm/backend/genauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'kdm/backend/genauth.c')
-rw-r--r--kdm/backend/genauth.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kdm/backend/genauth.c b/kdm/backend/genauth.c
index 2978851e1..6da95cce0 100644
--- a/kdm/backend/genauth.c
+++ b/kdm/backend/genauth.c
@@ -488,3 +488,13 @@ GenerateAuthData( char *auth, int len )
# endif
#endif
}
+
+#ifndef HAVE_ARC4RANDOM
+int
+secureRandom( void )
+{
+ int rslt;
+ GenerateAuthData( (char *)&rslt, sizeof(int) );
+ return rslt & 0x7fffffff;
+}
+#endif \ No newline at end of file