Mercurial > dropbear
comparison 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 |
comparison
equal
deleted
inserted
replaced
457:e430a26064ee | 458:c1e9c81d1d27 |
---|---|
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, |