From nobody@FreeBSD.ORG Mon Oct 11 12:35:48 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 5F44014A1E; Mon, 11 Oct 1999 12:35:48 -0700 (PDT)
Message-Id: <19991011193548.5F44014A1E@hub.freebsd.org>
Date: Mon, 11 Oct 1999 12:35:48 -0700 (PDT)
From: dwhite@freebsd.org
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: vfsload() looks in /lkm, not /modules
X-Send-Pr-Version: www-1.0

>Number:         14266
>Category:       i386
>Synopsis:       vfsload() looks in /lkm, not /modules
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 11 12:40:01 PDT 1999
>Closed-Date:    Tue Jun 20 19:45:19 PDT 2000
>Last-Modified:  Tue Jun 20 19:46:28 PDT 2000
>Originator:     Doug White
>Release:        3.3-RELEASE
>Organization:
>Environment:
FreeBSD tbone.egroups.net 3.3-STABLE FreeBSD 3.3-STABLE #3: Fri Oct  8 11:54:16 GMT 1999     root@tbone.egroups.net:/usr/src/sys/compile/TBONE  i386

>Description:
In src/lib/libc/gen/getvfsent.c, the structure vfs_lkmdirs is:

static const char *vfs_lkmdirs[] = {
        "/lkm",
        "/usr/lkm",
        0,
        0
};

vfspath() uses this as the list of directories to search.  If the
user is root, the value of the environment variable LKMDIRS is appended
to the list.

Obviously, /lkm is nonexistent on 3.X and later systems.  As a result,
when mount_msdos() (or any mount_*) tries to dynamically load the 
FS module, it runs into the error.

For some reason it works as root but gives a cryptic 'No such file or
directory' error when attempting to mount as a user, regardless of
vfs.usermount sysctl.
>How-To-Repeat:
Mount a filesystem with an unloaded KLD module but not compiled into 
the kernel, such as msdos.
>Fix:
Change references to 'lkm' to 'modules'.

WORKAROUND: ln -s /modules /lkm

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: nrahlstr 
State-Changed-When: Tue Jun 20 19:45:19 PDT 2000 
State-Changed-Why:  
Peter fixed this in revision 1.14 of src/lib/libc/gen/getvfsent.c.  


http://www.freebsd.org/cgi/query-pr.cgi?pr=14266 
>Unformatted:
