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'.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to