I'm trying to create a little container that will let me remap /dev/random to /dev/urandom without root for a specific program. What I have so far:
unshare -r bash -c 'chroot . /bin/busybox sh'
For the most part, this seems to act as a full chroot, equivalent to
sudo chroot . /bin/busybox sh, but one problem: When I try to mknod somefile c 1 9, I get operation not permitted. This works in a standard chroot. Is it possible to get around this? If not, is there a better way to do what I am attempting?
Please don't drown me in comments about the security of random vs urandom. That's not what this is about.