Mercurial > dropbear
comparison random.c @ 602:2d896267f16d
- Fix DROPBEAR_PRNGD_SOCKET since it doesn't need to call connect()
any more
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 27 Feb 2011 13:12:17 +0000 |
parents | a98a2138364a |
children | 2b1bb792cd4d 167fdc091c05 |
comparison
equal
deleted
inserted
replaced
601:2cd89d627adb | 602:2d896267f16d |
---|---|
70 | 70 |
71 #ifdef DROPBEAR_PRNGD_SOCKET | 71 #ifdef DROPBEAR_PRNGD_SOCKET |
72 readfd = connect_unix(DROPBEAR_PRNGD_SOCKET); | 72 readfd = connect_unix(DROPBEAR_PRNGD_SOCKET); |
73 | 73 |
74 if (readfd < 0) { | 74 if (readfd < 0) { |
75 dropbear_exit("Couldn't open random device"); | |
76 } | |
77 /* todo - try various common locations */ | |
78 if (connect(readfd, (struct sockaddr*)&egdsock, | |
79 sizeof(struct sockaddr_un)) < 0) { | |
80 dropbear_exit("Couldn't open random device"); | 75 dropbear_exit("Couldn't open random device"); |
81 } | 76 } |
82 | 77 |
83 if (buflen > 255) | 78 if (buflen > 255) |
84 dropbear_exit("Can't request more than 255 bytes from egd"); | 79 dropbear_exit("Can't request more than 255 bytes from egd"); |