From owner-freebsd-current Tue Feb 6 22: 8:57 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id A7E6F37B503 for ; Tue, 6 Feb 2001 22:08:36 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id RAA08281; Wed, 7 Feb 2001 17:08:27 +1100 Date: Wed, 7 Feb 2001 17:08:05 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Steve Kargl Cc: FreeBSD Current Subject: Re: DEVFS and ms-dos partitions In-Reply-To: <200102070543.f175hYZ14318@troutmask.apl.washington.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 6 Feb 2001, Steve Kargl wrote: > I have a world and kernel from 4 Feb 01. I tried listing the > contents in my mounted MS-DOS slice via "ls /msdos" as a normal > users, but got a permission denied message (which I've never > received before). So, a quick check on the directory permissions > shows: > > d-------w- 1 root 493 arch 4096 Jan 1 1980 msdos/ > > which appears to be somewhat strange. So, I unmounted the > slice and manually mounted the slice with various incantations > of mount_msdos. All yield the above listing. > > The source in src/sbin/mount_msdos has changed in a long time, > so is this a side effect of using DEVFS? This is caused by the same bug that cause panics for exporting filesystems (things in mount structs moving around whenever the size of struct mtx changes). struct msdosfs_args is particularly well designed to be affected by this bug even when nothing is exported: struct msdosfs_args { char *fspec; /* blocks special holding the fs to mount */ struct export_args export; /* network export information */ uid_t uid; /* uid that owns msdosfs files */ gid_t gid; /* gid that owns msdosfs files */ mode_t mask; /* mask to be applied for msdosfs perms */ int flags; /* see below */ int magic; /* version number */ u_int16_t u2w[128]; /* Local->Unicode table */ u_int8_t ul[128]; /* Local upper->lower table */ u_int8_t lu[128]; /* Local lower->upper table */ u_int8_t d2u[128]; /* DOS->local table */ u_int8_t u2d[128]; /* Local->DOS table */ }; The fields after the export field become garbage when the size of the export field changes. The garbage is easy to see using `ls -ld /msdos'. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message