From nobody@FreeBSD.org  Tue Jan  6 13:30:53 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9D614106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  6 Jan 2009 13:30:53 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 8C1728FC17
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  6 Jan 2009 13:30:53 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n06DUqBl077215
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 6 Jan 2009 13:30:52 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n06DUq9k077213;
	Tue, 6 Jan 2009 13:30:52 GMT
	(envelope-from nobody)
Message-Id: <200901061330.n06DUq9k077213@www.freebsd.org>
Date: Tue, 6 Jan 2009 13:30:52 GMT
From: Artyom Zuikov <4ertus2@mail.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: usermount fails on fs that need iconv
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         130229
>Category:       kern
>Synopsis:       [iconv] usermount fails on fs that need iconv
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-fs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 06 13:40:01 UTC 2009
>Closed-Date:    Mon Aug 16 18:53:46 UTC 2010
>Last-Modified:  Mon Aug 16 18:53:46 UTC 2010
>Originator:     Artyom Zuikov
>Release:        7.1-STABLE
>Organization:
>Environment:
FreeBSD 4ertus2 7.1-STABLE FreeBSD 7.1-STABLE #0: Mon Jan  5 23:19:08 MSK 2009     root@4ertus2:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
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

>How-To-Repeat:
Try to usermount a filesystem that need *iconv.ko modules
>Fix:
Try mount this filesystem by root at boot time. But it writes error messages to syslog.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: remko 
Responsible-Changed-When: Tue Jan 6 15:05:43 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130229 

From: "Garrett Cooper" <yanefbsd@gmail.com>
To: "Artyom Zuikov" <4ertus2@mail.ru>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/130229: usermount fails on fs that need iconv
Date: Tue, 6 Jan 2009 09:14:55 -0800

     sysctl -n vfs.usermount says?
 Thanks,
 -Garrett

From: Maxim Konovalov <maxim@macomnet.ru>
To: Garrett Cooper <yanefbsd@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: kern/130229: usermount fails on fs that need iconv
Date: Tue, 6 Jan 2009 23:44:30 +0300 (MSK)

 >      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

From: 4ertus2 <4ertus2@mail.ru>
To: "Garrett Cooper" <yanefbsd@gmail.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/130229: usermount fails on fs that need iconv
Date: Wed, 7 Jan 2009 04:59:01 +0300

 >     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.

From: Mateusz Guzik <mjguzik@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/130229: [iconv] usermount fails on fs that need iconv
Date: Wed, 7 Jan 2009 04:10:39 +0100

 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>
State-Changed-From-To: open->closed 
State-Changed-By: arundel 
State-Changed-When: Mon Aug 16 18:51:02 UTC 2010 
State-Changed-Why:  
Duplicate of kern/109024 and bin/93857. 

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