summaryrefslogtreecommitdiffhomepage
path: root/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'random.c')
-rw-r--r--random.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/random.c b/random.c
index f1475ed..ba8b2bd 100644
--- a/random.c
+++ b/random.c
@@ -69,12 +69,8 @@ static void readrand(unsigned char* buf, unsigned int buflen) {
#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");
}