From owner-freebsd-security@FreeBSD.ORG Mon Oct 20 01:21:15 2003 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91FDC16A4F4 for ; Mon, 20 Oct 2003 01:21:15 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9356A43FAF for ; Mon, 20 Oct 2003 01:21:14 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.10/8.12.10) with ESMTP id h9K8LB4b007573; Mon, 20 Oct 2003 10:21:11 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Adam Nowacki From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 19 Oct 2003 23:12:59 +0200." <3F92FE5B.5070709@bsk.vectranet.pl> Date: Mon, 20 Oct 2003 10:21:10 +0200 Message-ID: <7572.1066638070@critter.freebsd.dk> X-Mailman-Approved-At: Mon, 27 Oct 2003 03:48:04 -0800 cc: freebsd-security@freebsd.org Subject: Re: jail + devfs + snp problem (FreeBSD 5.1-RELEASE-p10) X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Security issues [members-only posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2003 08:21:15 -0000 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.