[ruby-core:90850] [Ruby trunk Bug#15494] Fix Random.urandom in a chroot on OpenBSD

From: merch-redmine@...
Date: 2019-01-02 04:26:12 UTC
List: ruby-core #90850
Issue #15494 has been reported by jeremyevans0 (Jeremy Evans).

----------------------------------------
Bug #15494: Fix Random.urandom in a chroot on OpenBSD
https://bugs.ruby-lang.org/issues/15494

* Author: jeremyevans0 (Jeremy Evans)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-openbsd]
* Backport: 2.4: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED
----------------------------------------
r64625 broke `Random.urandom` because it uses `OpenBSD` as a macro when it is not defined.  You must include the `sys/param.h` header to define the macro.  I've tested the attached patch and it fixes `Random.urandom` usage inside a chroot on OpenBSD.

This will need to be backported to 2.6.

---Files--------------------------------
patch-random_c (355 Bytes)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next