diff random.c @ 458:c1e9c81d1d27 agent-client

propagate from branch 'au.asn.ucc.matt.dropbear' (head 8a7db1e2fdc5636abb338adb636babc32f465739) to branch 'au.asn.ucc.matt.dropbear.cli-agent' (head d82c25da2f7e4fb6da510d806c64344e80bb270d)
author Matt Johnston <matt@ucc.asn.au>
date Thu, 16 Aug 2007 13:34:37 +0000
parents 2cd2edfa11ee 08b69964e408
children a98a2138364a
line wrap: on
line diff
--- a/random.c	Wed Aug 08 15:57:50 2007 +0000
+++ b/random.c	Thu Aug 16 13:34:37 2007 +0000
@@ -69,12 +69,8 @@
 #endif
 
 #ifdef DROPBEAR_PRNGD_SOCKET
-	memset((void*)&egdsock, 0x0, sizeof(egdsock));
-	egdsock.sun_family = AF_UNIX;
-	strlcpy(egdsock.sun_path, DROPBEAR_PRNGD_SOCKET,
-			sizeof(egdsock.sun_path));
+	readfd = connect_unix(DROPBEAR_PRNGD_SOCKET);
 
-	readfd = socket(PF_UNIX, SOCK_STREAM, 0);
 	if (readfd < 0) {
 		dropbear_exit("couldn't open random device");
 	}