Bug 130229 - [iconv] usermount fails on fs that need iconv
Summary: [iconv] usermount fails on fs that need iconv
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.1-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-06 13:40 UTC by Zuikov Artyom
Modified: 2010-08-16 19:53 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zuikov Artyom 2009-01-06 13:40:01 UTC
Usermount of filesystem that need iconv fails whith "Operation not permitted". But it mounts if it have been mounted and unmounted by root earlier.

~>cat /etc/fstab | grep flash
/dev/da4s1      /mnt/flash      msdosfs rw,noauto,noexec,-L=ru_RU.UTF-8,-D=CP866 0 0
~> kldstat | grep iconv
 5    1 0xffffffff80cf8000 ec8      cd9660_iconv.ko
 6    3 0xffffffff80cf9000 5360     libiconv.ko
 7    1 0xffffffff80cff000 ed8      msdosfs_iconv.ko
~> mount /mnt/flash
mount_msdosfs: msdosfs_iconv: Operation not permitted
~> sudo mount /mnt/flash
~> sudo umount /mnt/flash
~> mount /mnt/flash
~> umount /mnt/flash

Fix: 

Try mount this filesystem by root at boot time. But it writes error messages to syslog.
How-To-Repeat: Try to usermount a filesystem that need *iconv.ko modules
Comment 1 Remko Lodder freebsd_committer freebsd_triage 2009-01-06 15:05:43 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer.
Comment 2 Garrett Cooper 2009-01-06 17:14:55 UTC
    sysctl -n vfs.usermount says?
Thanks,
-Garrett
Comment 3 Maxim Konovalov 2009-01-06 20:44:30 UTC
>      sysctl -n vfs.usermount says?

That's about wellknown problem with the usermount -- *iconv.ko modules
won't be loaded by non-root user.

-- 
Maxim Konovalov
Comment 4 Zuikov Artyom 2009-01-07 01:59:01 UTC
>     sysctl -n vfs.usermount says?

~> sysctl -n vfs.usermount
1

The problem looks like FreeBSD tryes to load *iconv modules the first time I mount filesystem, but user have't permitions for this operation. In this case kldload should have an option to load modules immediately.
Comment 5 Mateusz Guzik 2009-01-07 03:10:39 UTC
Hi,

this is a duplicate of kern/109024. As described, mount_msdosfs calls
kiconv_add_xlat16_cspairs and it fails. While mounting using root
credentials, kiconv_add_xlat16_cspairs is successfull and that's why
after mount/umount it works fine for non-root users.

bin/93857 contains possible fix.

Thanks,
-- 
Mateusz Guzik <mjguzik at gmail.com>
Comment 6 Alexander Best freebsd_committer freebsd_triage 2010-08-16 19:51:02 UTC
State Changed
From-To: open->closed

Duplicate of kern/109024 and bin/93857.