Exemplo n.º 1
0
static sexp sexp_random_reseed_stub (sexp ctx, sexp self, sexp_sint_t n, sexp arg0) {
  sexp res;
  if (! sexp_exact_integerp(arg0))
    return sexp_type_exception(ctx, self, SEXP_FIXNUM, arg0);
  res = ((random_reseed(sexp_uint_value(arg0))), SEXP_VOID);
  return res;
}
Exemplo n.º 2
0
/* ARGSUSED */
static int
random_close(dev_t dev __unused, int flags, int fmt __unused, struct thread *td)
{
	if (flags & FWRITE) {
		if (!(suser(td) ||
		    securelevel_gt(td->td_ucred, 0)))
			random_reseed();
	}
	return 0;
}