From owner-freebsd-fs@FreeBSD.ORG Mon Sep 23 15:59:05 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 64FF16F for ; Mon, 23 Sep 2013 15:59:05 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm3-vm0.bullet.mail.bf1.yahoo.com (nm3-vm0.bullet.mail.bf1.yahoo.com [98.139.212.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DF35026C5 for ; Mon, 23 Sep 2013 15:59:04 +0000 (UTC) Received: from [66.196.81.173] by nm3.bullet.mail.bf1.yahoo.com with NNFMP; 23 Sep 2013 15:59:03 -0000 Received: from [98.139.211.202] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 23 Sep 2013 15:59:03 -0000 Received: from [127.0.0.1] by smtp211.mail.bf1.yahoo.com with NNFMP; 23 Sep 2013 15:59:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1379951943; bh=tMexr3togx4951KiLecbXVR+X8y17blMblTPevH7AsM=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=IGkosppqDuuq4UVNqRzHPKmpl8T0oMD/IgaOSZJc3aQ9bsMelfViHOdQrs7vMZvNO4apJRYmwdGjdWHxbNCiyisqURS+hMRA9yk2ftCcuVGMBffDOeAbwaswJlaTZb1Kx1tuROwUgvol4lM6EWloWSOKR6aQ3RH+aP1Gv5xdiIk= X-Yahoo-Newman-Id: 331044.70307.bm@smtp211.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: ZMv3LFgVM1mnEzGvqP1w6AhDh7MkgXSRsUpWfc7F1ZRpsCw 6XSgoiZyJkQOXfE4mZA0M5.3mG9VcdS6JfCvB5zwcfMY77Tog7cDu_D01UDS L8f9WiCQzzNQqKvUjs6b2V6GjPqQmCS97TypHyHjU7pQb5uIR4JDvU9fpg9p Kqsm_q3habHbZ4VqLrMXImxLMr2PTiBwtqxGIp9lD1kcgWXYJUtWjE8m.lMW UhKMdBmEY2zksnuDVIuDI2m7EjCj7xhk89IInCE6ihLrdhHR9dJXgpUHllc_ cFKeNT0l4UlOgkXMYYIiirv5J220AG7WI_DpZk8TjF3O2Rh2Ekn4XT__08gN QCOoycsP6jLb5vjR7RlvqmpYeVmRUG0KT_W3F5wGwidkWTRW3I07B.hIiNrK B9oS0orfiDeAhLisxaYXatCBxCTiMccNj363cSWgCSu27Y0iRtyD0H1SceGp 3ho5j.BjTYBFCvSpaGpD7M99lP2Jl2x2W1cyC0dfZJQ08n6uuIXbFsXH0OYZ YEsUSujAoPMU3Hdq0xdmzw9yGXGM9rbPoviq6xTcBpZbxa6PYK6VInrUkodG xEg-- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with ) by smtp211.mail.bf1.yahoo.com with SMTP; 23 Sep 2013 08:59:03 -0700 PDT Subject: kern/vfs_mount.c vfs_donmount() checks of MFSNAMELEN From: Sean Bruno To: freebsd-fs Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-qY0k3IygIQKXYmuQRk/D" Date: Mon, 23 Sep 2013 08:59:01 -0700 Message-ID: <1379951941.1612.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 15:59:05 -0000 --=-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--