Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Sep 2013 08:59:01 -0700
From:      Sean Bruno <sean_bruno@yahoo.com>
To:        freebsd-fs <freebsd-fs@freebsd.org>
Subject:   kern/vfs_mount.c vfs_donmount() checks of MFSNAMELEN
Message-ID:  <1379951941.1612.3.camel@localhost>

next in thread | raw e-mail | index | archive | help

--=-qY0k3IygIQKXYmuQRk/D
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

So, I'm confused by this check:

        if (fstypelen >=3D MFSNAMELEN - 1 || fspathlen >=3D MNAMELEN - 1) {
                error =3D ENAMETOOLONG;
                goto bail;
        }

MFSNAMELEN is 16, why do we check against >=3D MFSNAMELEN - 1?  Why dont
we check against (> MFSNAMELEN - 1) or (>=3D MFSNAMELEN)?  Is a 14
character fstypelen with a "\0" at the end considered too long?

Sean

p.s. e.g. mount -t fuse.glusterfs ...

--=-qY0k3IygIQKXYmuQRk/D
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (FreeBSD)

iQEcBAABAgAGBQJSQGU+AAoJEBkJRdwI6BaHOAUH/09VhiTVOo2XKSaiFWlju+eZ
eM/s6X6WtfqHpoLa6Zg5v5DULcVj1GT6y/OEeudt6rG9u8qHODEB7vXaTJ8Jik6Z
rBnq7MHu7PGGIV8GoV4U3fVNLBZ2B1KLcqYNQflxWGLlpvgv6F30VwszuEbhfsfy
UEjCRjMEZpsKsCswU5s8gMHliZjreai8B6QGVGcrUD6TuqshwrPKERKrZueeLxig
//f0Oc/sdKXMo3+FIbe8x5zB9ufZZpUIsRpfS6RrBa8iAa10e0075fWFybbjWsEf
rJVAYvfm/5LLtDw6xu+B2Tw9NxSecO51owd8biKNjhmP7IjVDvoo55m1ZEwSlQs=
=mXvX
-----END PGP SIGNATURE-----

--=-qY0k3IygIQKXYmuQRk/D--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1379951941.1612.3.camel>