| Summary: | vfsload() looks in /lkm, not /modules | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Doug White <dwhite> |
| Component: | i386 | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 3.3-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed Peter fixed this in revision 1.14 of src/lib/libc/gen/getvfsent.c. |
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. Fix: Change references to 'lkm' to 'modules'. WORKAROUND: ln -s /modules /lkm How-To-Repeat: Mount a filesystem with an unloaded KLD module but not compiled into the kernel, such as msdos.