Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Oct 2003 10:21:10 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Adam Nowacki <ptnowak@bsk.vectranet.pl>
Cc:        freebsd-security@freebsd.org
Subject:   Re: jail + devfs + snp problem (FreeBSD 5.1-RELEASE-p10) 
Message-ID:  <7572.1066638070@critter.freebsd.dk>
In-Reply-To: Your message of "Sun, 19 Oct 2003 23:12:59 %2B0200." <3F92FE5B.5070709@bsk.vectranet.pl> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <3F92FE5B.5070709@bsk.vectranet.pl>, Adam Nowacki writes:

>shell# /sbin/devfs rule -s 2 delset
>shell# /sbin/devfs rule -s 2 add hide
>shell# /sbin/devfs rule -s 2 add path random unhide
>shell# /sbin/devfs rule -s 2 add path urandom unhide
>shell# /sbin/devfs rule -s 2 add path zero unhide
>shell# /sbin/devfs rule -s 2 add path pty\* unhide
>shell# /sbin/devfs rule -s 2 add path pty\* unhide
>shell# /sbin/devfs rule -s 2 add path tty\* unhide
>shell# /sbin/mount_devfs devfs /storage0/site/dev

Running
	ls -l /storage0/site/dev/snp*

will undoubtedly show one or more snp* devices.

>shell# /sbin/devfs -m /storage0/site/dev ruleset 2

This only makes the ruleset apply to devices created in the future.

To also apply it to currently created devices, you should also
give the command:

	/sbin/devfs -m /storage0/site/dev rule applyset

After which any snp* (and other filtered) devices will be gone.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



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