Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 May 2010 13:26:34 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        ticso@cicely.de
Cc:        freebsd-hackers@freebsd.org, Tjado M?cke <tjado.ml.freebsd-hackers@maecke.net>, "Julian H. Stacey" <jhs@berklix.com>
Subject:   Re: /dev/null & zero inside chroot for make release
Message-ID:  <20100517102634.GI83316@deviant.kiev.zoral.com.ua>
In-Reply-To: <20100517102007.GQ92942@cicely7.cicely.de>
References:  <201005151225.o4FCPkl3056460@fire.js.berklix.net> <4BEEBE99.4050105@maecke.net> <20100517102007.GQ92942@cicely7.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--ixDdryD3ui8aoCe5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, May 17, 2010 at 12:20:07PM +0200, Bernd Walter wrote:
> On Sat, May 15, 2010 at 05:32:41PM +0200, Tjado M?cke wrote:
> >=20
> > > Thanks for trying to help :-)  But this is in Wrong.
> > > Line 4 on that page:
> > > 	Last updated: 2005-08-11
> > > 5 years later, FreeBSD-8.0 has via ls -l /dev/null
> > > crw-rw-rw-  1 root  wheel    0,  31 May 15 14:17 /dev/null
> > > so both major & minor numbers have changed, command now would be
> > > 	mknod dev/null c 0 31
> > > which I already posted in my original Thu, 13 May 2010 19:44:58 +0200
> > > as having tried, but not good enough.
> > >
> > > As I posted Fri, 14 May 2010 21:59:23 +0200 (but you may not have
> > > seen when you posted)
> > >
> > >  =20
> >=20
> > Hm... i did this on 7.2 because chrooted scponly shell with WinSCP
> > support needs it. In this case it works...
> > But I'm wrong because the dev/null with my nod numbers doesn't work
> > correctly and WinSCP looks only if this file is there :D
>=20
> On my 7.0-stable I have:
> [192]cicely7> ls -al /dev/null
> crw-rw-rw-  1 root  wheel    0,  14 May 17 12:11 /dev/null
>=20
> You may very well have you HDD under 2,2 and having any innocent program
> writing it's output to it...
> Fortunately it takes many devnodes until 2,2 is getting used.

For very long time, the following two statements are true:
- char devices only have magic property of being a door to the device
  drivers when living on devfs mount point. Character devices on UFS or
  any other non-devfs mounts do not provide access to the physical devices.
- major and minor numbers of devfs nodes, as displayed by ls, are not
  persistent across reboot.

mknod on devfs is only useful to unhide the rm'ed node.

--ixDdryD3ui8aoCe5
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkvxGdkACgkQC3+MBN1Mb4j9fACferelEcUfCgWDAIocQ8pKz87M
FGoAoJrBsH4Yt6hNR/ngjyD+RT+A37GT
=edxm
-----END PGP SIGNATURE-----

--ixDdryD3ui8aoCe5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100517102634.GI83316>