Date: Tue, 3 Sep 2002 01:40:25 -0700 (PDT) From: Patrick Thomas <root@utility.clubscholarship.com> To: <freebsd-hackers@freebsd.org> Subject: `dump` and/or `restore` incorrectly handles /dev files Message-ID: <20020903012715.G58763-100000@utility.clubscholarship.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020903012715.G58763-100000>