jailkit-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Jailkit-users] How to fix jailkit problems with /dev/null in FreeBS


From: Olivier Sessink
Subject: Re: [Jailkit-users] How to fix jailkit problems with /dev/null in FreeBSD
Date: Wed, 30 May 2012 22:06:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 05/29/2012 04:33 PM, Jordi Moles Blanco wrote:

> 3. You copy /dev/null in the jail "the FreeBSD way", that is,
> 
> cp /dev/null /jailkitpath/dev/null

I know little about FreeBSD, but on Linux you cannot copy devices with
cp. You have to create a device with mknod.

> Well... although this /dev/null thing allows you to run some binaries,
> it fails when for example you want to use git. The reason is because it
> needs /dev/urandom and that doesn't exist in FreeBSD. Actually, we do
> have /dev/urandom
> 
> but...
> 
> # ls -la /dev/urandom
> lrwxr-xr-x  1 root  wheel  6 Nov  3  2011 /dev/urandom -> random
> 
> it's a mere link...
> 
> which causes problems because
> 
> /dev/random doesn't work the same way as /dev/urandom
> 
> in order to fix this...
> 
> we have to literally copy /dev/random into the jail, again with "cp" and
> not "jk_cp"
> 
> cp /dev/random /jailkitpath/dev/urandom
> cp /dev/random /jailkitpath/dev/random
> actually, you have to run these commands and then "ctrl+c", that is,
> cancel the commands, after a second or two. If you don't do that, the
> "cp" command will continue to create random numbers and store them in
> the /jailkitpath/dev/random file.

again, use mknod and not cp them. Copy them will indeed copy the
contents, and not create a device.

Olivier

-- 
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]