From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 19 20:58:47 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7D52106566B for ; Thu, 19 Apr 2012 20:58:47 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 320DA8FC0A for ; Thu, 19 Apr 2012 20:58:46 +0000 (UTC) Received: by lbbgm6 with SMTP id gm6so3103255lbb.13 for ; Thu, 19 Apr 2012 13:58:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding :x-gm-message-state; bh=Y6NV1Lubl5wbsuQ6I7EzCW66hEGigAyh0mn+We0CDO8=; b=nCPZxwUEf11prIh0zKONoDcqiwiCZzUWHrWgMd8BHvghhN0W0BSjeLG21ZQJa+TdYw z6v8abnx8Zr4YiRklmefR4hU8HAfY8ZhlH/zNf99kPmL4b1hfJaFty1s6Bk9+JE9YcPT gGxJyPCEfxjQy1s9D9Gew3VZBaAl4J5l9wWV/Nnq8i50azRXzplOsGNrj+yJEj2Ys9UR FFjUNJvSVt1xLxKqTiqWcNq54evT4KyffTYpGWMr3yDUyrR5lXivRuZHS1cXrTz6P6mr iZgERFCU57hp6q2/cw1ngu2eNoktuUiwgzcOMja1c2KZS1KExLEuX9gl1qzgYSSwSXE2 v+iQ== MIME-Version: 1.0 Received: by 10.112.49.5 with SMTP id q5mr1765171lbn.7.1334869124876; Thu, 19 Apr 2012 13:58:44 -0700 (PDT) Received: by 10.112.54.41 with HTTP; Thu, 19 Apr 2012 13:58:44 -0700 (PDT) X-Originating-IP: [216.223.13.111] In-Reply-To: References: Date: Thu, 19 Apr 2012 16:58:44 -0400 Message-ID: From: Mark Saad To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQly6yuNo9Lt6jSgdxebKYCkOzxMsnPRrvSx46O3LUvjzmdYYT+oCwMAbLaRhAcv6oEJQ9bH Subject: Re: mount_nfs does not like exports longer then 88 chars X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Apr 2012 20:58:47 -0000 On Thu, Apr 19, 2012 at 3:51 PM, Andrew Duane wrote: > MNAMELEN is used to bound the Mount NAMe LENgth, and is used in many many= places. It may seem to work fine, but there are lots of utilities and such= that will almost certainly fail managing it. Search the source code for MN= AMELEN..... I see that this is used in a number of Mount and fs bits. Do you know why mount_nfs would care how long the exported path and hostname are ? > > =C2=A0................................... > Andrew Duane > Juniper Networks > +1 978-589-0551=C2=A0(o) > +1 603-770-7088=C2=A0(m) > aduane@juniper.net > > > > >> -----Original Message----- >> From: owner-freebsd-hackers@freebsd.org [mailto:owner-freebsd- >> hackers@freebsd.org] On Behalf Of Mark Saad >> Sent: Thursday, April 19, 2012 3:46 PM >> To: freebsd-hackers@freebsd.org >> Subject: mount_nfs does not like exports longer then 88 chars >> >> Hello Hackers >> =C2=A0 I was wondering if anyone has come across this issue. This exists= in >> FreeBSD 6, 7, and 9 , and probably in 8 but I am not using it at this ti= me. >> When a nfs export path and host name total to more then 88 characters >> mount_nfs bombs out with the following error when it attempts to mount i= t. >> >> mount_nfs: nyisilon2-13.grp2:/ifs/clients/www/csar884520456/files_cms- s= tage-BK/imagefield_default_images: >> File name too long >> >> I traced this down to a check in mount_nfs.c . This is about line 560 >> in the 7-STABLE version =C2=A0and =C2=A0734 in the 9-STABLE version >> >> >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* If there has been a trailing slash a= t mounttime it seems >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* that some mountd implementations fai= l to remove the mount >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0* entries from their mountlist while u= nmounting. >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/ >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (speclen =3D strlen(spec); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 speclen > 1 && s= pec[speclen - 1] =3D=3D '/'; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 speclen--) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 spec[speclen - 1= ] =3D '\0'; >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (strlen(hostp) + strlen(spec) + 1 > MNAME= LEN) { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 warnx("%s:%s: %s= ", hostp, spec, strerror(ENAMETOOLONG)); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return (0); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 } >> >> Does any one know why the check for hostp + spec +1 to be less then >> MNAMELEN is there for ? >> >> =C2=A0I removed the check on my 9-STABLE box and it mounts the long moun= ts fine >> >> I submitted a pr for this its kern/167105 >> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D167105 as there is no >> mention of this in the man page and I cant find any reason for the check= at all. >> >> >> -- >> mark saad | nonesuch@longcount.org >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers- >> unsubscribe@freebsd.org" --=20 mark saad | nonesuch@longcount.org