comparison random.c @ 500:d588e3ea557a agent-client

propagate from branch 'au.asn.ucc.matt.dropbear' (head 4fb35083f0f46ea667e7043e7d4314aecd3df46c) to branch 'au.asn.ucc.matt.dropbear.cli-agent' (head 833d0adef6cdbf43ea75283524c665e70b0ee1ee)
author Matt Johnston <matt@ucc.asn.au>
date Tue, 23 Sep 2008 16:05:04 +0000
parents c1e9c81d1d27
children a98a2138364a
comparison
equal deleted inserted replaced
499:f3ca5ebc319a 500:d588e3ea557a
67 dropbear_exit("couldn't open random device"); 67 dropbear_exit("couldn't open random device");
68 } 68 }
69 #endif 69 #endif
70 70
71 #ifdef DROPBEAR_PRNGD_SOCKET 71 #ifdef DROPBEAR_PRNGD_SOCKET
72 memset((void*)&egdsock, 0x0, sizeof(egdsock)); 72 readfd = connect_unix(DROPBEAR_PRNGD_SOCKET);
73 egdsock.sun_family = AF_UNIX; 73
74 strlcpy(egdsock.sun_path, DROPBEAR_PRNGD_SOCKET,
75 sizeof(egdsock.sun_path));
76
77 readfd = socket(PF_UNIX, SOCK_STREAM, 0);
78 if (readfd < 0) { 74 if (readfd < 0) {
79 dropbear_exit("couldn't open random device"); 75 dropbear_exit("couldn't open random device");
80 } 76 }
81 /* todo - try various common locations */ 77 /* todo - try various common locations */
82 if (connect(readfd, (struct sockaddr*)&egdsock, 78 if (connect(readfd, (struct sockaddr*)&egdsock,