From owner-freebsd-bugs@FreeBSD.ORG Sat Feb 10 16:20:16 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A64F16A401 for ; Sat, 10 Feb 2007 16:20:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 3992D13C4A5 for ; Sat, 10 Feb 2007 16:20:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l1AGKGIu005028 for ; Sat, 10 Feb 2007 16:20:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l1AGKGnj005027; Sat, 10 Feb 2007 16:20:16 GMT (envelope-from gnats) Resent-Date: Sat, 10 Feb 2007 16:20:16 GMT Resent-Message-Id: <200702101620.l1AGKGnj005027@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Rechistov Grigory Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 581D216A408 for ; Sat, 10 Feb 2007 16:18:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 47D2C13C471 for ; Sat, 10 Feb 2007 16:18:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l1AGIjO2006946 for ; Sat, 10 Feb 2007 16:18:45 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l1AGIjGO006944; Sat, 10 Feb 2007 16:18:45 GMT (envelope-from nobody) Message-Id: <200702101618.l1AGIjGO006944@www.freebsd.org> Date: Sat, 10 Feb 2007 16:18:45 GMT From: Rechistov Grigory To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: kern/109024: mount_msdosfs: msdosfs_iconv: Operation not permitted X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Feb 2007 16:20:16 -0000 >Number: 109024 >Category: kern >Synopsis: mount_msdosfs: msdosfs_iconv: Operation not permitted >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Feb 10 16:20:15 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Rechistov Grigory >Release: 6.2-STABLE >Organization: >Environment: FreeBSD ipv82-180.rt.private.mipt.ru 6.2-STABLE FreeBSD 6.2-STABLE #3: Thu Jan 25 15:50:36 MSK 2007 GGG@ipv82-180.rt.private.mipt.ru:/usr/obj/usr/src/sys/DELL_v4 i386 >Description: I want to use automounter application thunar-volman (Xfce desktop) powered by HAL. I hav e a line in my /etc/fstab, which corresponds to my flash drive: /dev/da0s1 /mnt/FLASH0 msdosfs rw,noauto,-u=GGG,-L=ru_RU.KOI8-R,-D=CP866 0 0 but when I plug it in an error appears: mount_msdosfs: msdosfs_iconv: Operation not permitted. I have sysctl vfs.usermount set to 1, kernel modules msdosfs.ko and msdosfs_iconv.ko loaded. So I try to mount the device by hand as an ordinary user: $ mount -t msdosfs -o-L=ru_RU.KOI8-R,-D=CP866 /dev/da0s1 /mnt/FLASH0; all rights on folder are set correctly so I should be able to perform the operation. But the same error raises. When I try to mount cd9660 and ntfs volumes with "-C koi8-r" option everything is just fine (though they perform different conversion from unicode). When I try to mount the same msdosfs disk without any locale options - it works. When mount_msdosfs is run from root user - no errors. So the problem is somewhere in kernel iconv mechanism. >How-To-Repeat: [check that sysctl vfs.usermount is set to 1, and mountpoint is owned by user] $ mount -t msdosfs -o-L=ru_RU.KOI8-R,-D=CP866 /dev/da0s1 /mnt/FLASH0 mount_msdosfs: msdosfs_iconv: Operation not permitted $ mount -t msdosfs /dev/da0s1 /mnt/FLASH0 This works fine. >Fix: The only way to continue use the automounter in this case is to set suid bit to mount_msdosfs. This is not the very best solution obviously. In my case there is also a bug in exo-mount (program which actually calls mount program - it handles HAL specification in incomplete way, elsewhere there would have been a elegant and robust workaround, I've also sent a PR to developers) >Release-Note: >Audit-Trail: >Unformatted: