28a29
> #include <openssl/err.h>
35a37,38
> #include "buffer.h"
> #include "bufaux.h"
48c51
< RCSID("$Id: entropy.c,v 1.49 2005/07/17 07:26:44 djm Exp $");
---
> RCSID("$Id: entropy.c,v 1.52 2005/09/27 22:26:30 dtucker Exp $");
148,151c151,152
< if ((original_uid = getuid()) == -1)
< fatal("getuid: %s", strerror(errno));
< if ((original_euid = geteuid()) == -1)
< fatal("geteuid: %s", strerror(errno));
---
> original_uid = getuid();
> original_euid = geteuid();
154a156,182
> #ifndef OPENSSL_PRNG_ONLY
> void
> rexec_send_rng_seed(Buffer *m)
> {
> u_char buf[RANDOM_SEED_SIZE];
>
> if (RAND_bytes(buf, sizeof(buf)) <= 0) {
> error("Couldn't obtain random bytes (error %ld)",
> ERR_get_error());
> buffer_put_string(m, "", 0);
> } else
> buffer_put_string(m, buf, sizeof(buf));
> }
>
> void
> rexec_recv_rng_seed(Buffer *m)
> {
> u_char *buf;
> u_int len;
>
> buf = buffer_get_string_ret(m, &len);
> if (buf != NULL) {
> debug3("rexec_recv_rng_seed: seeding rng with %u bytes", len);
> RAND_add(buf, len, len);
> }
> }
> #endif
> #include <openssl/err.h>
35a37,38
> #include "buffer.h"
> #include "bufaux.h"
48c51
< RCSID("$Id: entropy.c,v 1.49 2005/07/17 07:26:44 djm Exp $");
---
> RCSID("$Id: entropy.c,v 1.52 2005/09/27 22:26:30 dtucker Exp $");
148,151c151,152
< if ((original_uid = getuid()) == -1)
< fatal("getuid: %s", strerror(errno));
< if ((original_euid = geteuid()) == -1)
< fatal("geteuid: %s", strerror(errno));
---
> original_uid = getuid();
> original_euid = geteuid();
154a156,182
> #ifndef OPENSSL_PRNG_ONLY
> void
> rexec_send_rng_seed(Buffer *m)
> {
> u_char buf[RANDOM_SEED_SIZE];
>
> if (RAND_bytes(buf, sizeof(buf)) <= 0) {
> error("Couldn't obtain random bytes (error %ld)",
> ERR_get_error());
> buffer_put_string(m, "", 0);
> } else
> buffer_put_string(m, buf, sizeof(buf));
> }
>
> void
> rexec_recv_rng_seed(Buffer *m)
> {
> u_char *buf;
> u_int len;
>
> buf = buffer_get_string_ret(m, &len);
> if (buf != NULL) {
> debug3("rexec_recv_rng_seed: seeding rng with %u bytes", len);
> RAND_add(buf, len, len);
> }
> }
> #endif