comparison random.c @ 225:ca7e76d981d9 agent-client

- progress towards client agent forwarding (incomplete and does not compile)
author Matt Johnston <matt@ucc.asn.au>
date Mon, 18 Jul 2005 14:32:52 +0000
parents 65585699d980
children 79bf1023cf11
comparison
equal deleted inserted replaced
224:1dbd2473482f 225:ca7e76d981d9
66 dropbear_exit("couldn't open random device"); 66 dropbear_exit("couldn't open random device");
67 } 67 }
68 #endif 68 #endif
69 69
70 #ifdef DROPBEAR_PRNGD_SOCKET 70 #ifdef DROPBEAR_PRNGD_SOCKET
71 memset((void*)&egdsock, 0x0, sizeof(egdsock)); 71 readfd = connect_unix(DROPBEAR_PRNGD_SOCKET);
72 egdsock.sun_family = AF_UNIX; 72
73 strlcpy(egdsock.sun_path, DROPBEAR_PRNGD_SOCKET,
74 sizeof(egdsock.sun_path));
75
76 readfd = socket(PF_UNIX, SOCK_STREAM, 0);
77 if (readfd < 0) { 73 if (readfd < 0) {
78 dropbear_exit("couldn't open random device"); 74 dropbear_exit("couldn't open random device");
79 } 75 }
80 /* todo - try various common locations */ 76 /* todo - try various common locations */
81 if (connect(readfd, (struct sockaddr*)&egdsock, 77 if (connect(readfd, (struct sockaddr*)&egdsock,