From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 19 19:46:07 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD208106566C for ; Thu, 19 Apr 2012 19:46:07 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 500788FC0A for ; Thu, 19 Apr 2012 19:46:07 +0000 (UTC) Received: by lagv3 with SMTP id v3so8611976lag.13 for ; Thu, 19 Apr 2012 12:46:06 -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:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=oYtWuQiHZEqqBMqsYyBVHHNEWgiPoEJbvYOxY3sT+Jk=; b=aN50gB+CPUVl9wjw9RIWUZwzkaajwFxXnJfzttZsbGjQvB6gU6A5ydpgccbgiMsII6 jqWNfklQtEmYeqsUZ50mMXquRjrRkAXHXImv9fFGW3uhK1YGMV1xRMEmBOMRoQRajjf6 0NeqB9o2joDiji/4njXXnIZBLBZiC3z3wL2xMrexvhKRfGrHQ5Y3DvyzSig3TMeSFJAj TNUc72ouaPHNLt6nVPTyBqW3AuVcmblIvfq/kFXIBaoGukKydqMWmh0kE9DH5cylR8A2 3ZSUfT3dxLaFQsiszGfZpZOaaebovrH8FUjVK74eUfwSnBJs2cpDTom/TEvrDMqBsaql g46Q== MIME-Version: 1.0 Received: by 10.112.49.5 with SMTP id q5mr1666806lbn.7.1334864766245; Thu, 19 Apr 2012 12:46:06 -0700 (PDT) Received: by 10.112.54.41 with HTTP; Thu, 19 Apr 2012 12:46:06 -0700 (PDT) X-Originating-IP: [216.223.13.111] Date: Thu, 19 Apr 2012 15:46:06 -0400 Message-ID: From: Mark Saad To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQl+Xz499hbzL4Qu7Vt6evB2rc3yisYNzueJlWMCzLm1nMep/aUIkMo7e+n4n+q0tkfqkydI Subject: 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 19:46:07 -0000 Hello Hackers 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 time. 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 it. mount_nfs: nyisilon2-13.grp2:/ifs/clients/www/csar884520456/files_cms-stage-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 and 734 in the 9-STABLE version /* * If there has been a trailing slash at mounttime it seems * that some mountd implementations fail to remove the mount * entries from their mountlist while unmounting. */ for (speclen = strlen(spec); speclen > 1 && spec[speclen - 1] == '/'; speclen--) spec[speclen - 1] = '\0'; if (strlen(hostp) + strlen(spec) + 1 > MNAMELEN) { warnx("%s:%s: %s", hostp, spec, strerror(ENAMETOOLONG)); return (0); } Does any one know why the check for hostp + spec +1 to be less then MNAMELEN is there for ? I removed the check on my 9-STABLE box and it mounts the long mounts fine I submitted a pr for this its kern/167105 http://www.freebsd.org/cgi/query-pr.cgi?pr=167105 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