From owner-freebsd-hackers Tue Sep 3 1:43:46 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 31D2237B400 for ; Tue, 3 Sep 2002 01:43:44 -0700 (PDT) Received: from utility.clubscholarship.com (utility.clubscholarship.com [198.78.70.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBFF543E4A for ; Tue, 3 Sep 2002 01:43:43 -0700 (PDT) (envelope-from root@utility.clubscholarship.com) Received: from localhost (root@localhost) by utility.clubscholarship.com (8.11.6/8.11.6) with ESMTP id g838ePn55308 for ; Tue, 3 Sep 2002 01:40:25 -0700 (PDT) (envelope-from root@utility.clubscholarship.com) Date: Tue, 3 Sep 2002 01:40:25 -0700 (PDT) From: Patrick Thomas To: Subject: `dump` and/or `restore` incorrectly handles /dev files Message-ID: <20020903012715.G58763-100000@utility.clubscholarship.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Try this - it's good for a laugh: ls -asl dev/*mem 0 crw-r----- 1 root kmem 2, 1 Aug 27 15:16 kmem 0 crw-r----- 1 root kmem 2, 0 Aug 27 15:16 mem Now run this command, changing some permissions: chmod -w dev/mem ; chmod -w dev/kmem Now, dump that filesystem that your /dev resides on with: `dump -0a -f /some/file /dev/ad0a` Now, restore your dump file (/some/file) with: `restore -x -f /some/file` (I just restored into some arbitrary directory) (answered "1" for which volume to start with, and answered "y" to the trailing "set owner/mode for ." question) Now, once again, ls -asl dev/*mem 0 crw------- 1 root wheel 2, 1 Sep 3 01:13 kmem 0 crw------- 1 root wheel 2, 0 Sep 3 01:13 mem ------- Gee, that's funny - not only are they _not_ -w as they were changed to before dumping, but they've also lost a ----r----- as well ! Easily reproducible. Don't respond to this thread if all you have to say is "well you shouldn't be chmodding those files -w anyway". --pt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message