kern/167105: mount_nfs can not handle source exports wiht more then 63 chars

Mark Saad msaad at about.com
Thu Apr 19 19:00:24 UTC 2012


>Number:         167105
>Category:       kern
>Synopsis:       mount_nfs can not handle source exports wiht more then 63 chars
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 19 19:00:23 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Mark Saad
>Release:        FreeBSD 9.0-STABLE amd64
>Organization:
About.com
>Environment:
System: FreeBSD bguide2 9.0-STABLE FreeBSD 9.0-STABLE #2: Tue Apr 10 11:32:01 EDT 2012 root at blindness.ops.about.com:/usr/obj/usr/src/sys/GENERIC amd64

>Description:
	When using a source nfs export that has more then 63 chars total , in the combination of the source host name + the exported path mount_nfs returns ENAMETOOLONG .

>How-To-Repeat:
	With the following entry in /etc/fstab 
 fstab entry:  nyisilon2-13.grp2:/ifs/clients/www/csar884520456/files_cms-stage-BK/imagefield_default_images /mnt/csar nfs ro,tcp,intr 0 0

mount /mnt/csar faile with the following error

mount_nfs: nyisilon2-13.grp2:/ifs/clients/www/csar884520456/files_cms-stage-BK/imagefield_default_images: File name too long
                                              
                                               

>Fix:

In mount_nfs.c removing the conditional check for this on line 734 - 738 appears to remove this limitation
with no impact however am not sure why this check is in there. 

     /*
      * if (strlen(hostp) + strlen(spec) + 1 > MNAMELEN) {
      *         warnx("%s:%s: %s", hostp, spec, strerror(ENAMETOOLONG));  
      *         return (0);
      * }
      */

Note this issue exists in 7-STABLE , 8-STABLE and 9-STABLE as well as their respective RELEASES

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list