From owner-freebsd-stable@FreeBSD.ORG Tue Dec 19 23:25:25 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5697516A40F for ; Tue, 19 Dec 2006 23:25:25 +0000 (UTC) (envelope-from freebsd-stable@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC42543C9F for ; Tue, 19 Dec 2006 23:25:23 +0000 (GMT) (envelope-from freebsd-stable@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GwoKh-00063y-4Y for freebsd-stable@freebsd.org; Wed, 20 Dec 2006 00:25:15 +0100 Received: from r5h168.net.upc.cz ([86.49.7.168]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Dec 2006 00:25:15 +0100 Received: from gamato by r5h168.net.upc.cz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Dec 2006 00:25:15 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-stable@freebsd.org From: martinko Date: Wed, 20 Dec 2006 00:25:04 +0100 Lines: 53 Message-ID: References: <1166012592.00653256.1166001601@10.7.7.3> <4586CAEF.2000404@icyb.net.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: r5h168.net.upc.cz User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.0.8) Gecko/20061111 SeaMonkey/1.0.6 In-Reply-To: <4586CAEF.2000404@icyb.net.ua> Sender: news Subject: Re: Mounting smbfs as non-root X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2006 23:25:25 -0000 Andriy Gapon wrote: > on 13/12/2006 11:11 Peter Jeremy said the following: >> I am trying to mount a SMB filesystem as an ordinary user (because >> I don't want to give root to this particular person). Whilst >> running mount_smbfs as root works, attempting the same command >> as non-root consistently returns >> mount_smbfs: can not setup kernel iconv table (ISO8859-1:tolower): syserr = Operation not permitted >> >> I've looked at a ktrace and the source code and the offending code is >> sysctlbyname("kern.iconv.add", ...) >> >> I've looked through iconv_sysctl_add() and can't see any way for the >> code to return EPERM. >> >> My reading of all the code also suggests that once the relevant iconv >> tables are loaded, then iconv_sysctl_add() should return EEXIST >> (via iconv_register_cspair()). But even if the relevant translation >> table is loaded (by mounting a SMB filesystem as root), I still get >> the above error when trying to use mount_smbfs as a user. I've even >> written some code to let me look at the kern.iconv MIB tree which >> confirms the above but doesn't get any me any closer to a solution. >> >> This is the same on two 6.2-PRERELEASE systems and I get the same >> behaviour on an oldish 7-current system. Does anyone have any >> suggestions on what is going wrong? >> > > > Not entirely the same issue, but quite similar and rather annoying. > > I have the following in loader.conf: > msdosfs_iconv_load="YES" > msdosfs itself is built into kernel. > > kldstat confirms that the above modules are indeed loaded. > > I also have vfs.usermount=1 > > I can successfully mount any DOS fs as a regular user as long as I don't > specify any mount options that require iconv conversions. > Otherwise I get EPERM: > $ mount_msdosfs -L en_US.UTF-8 /dev/da0s1 /mnt/flash/ > mount_msdosfs: msdosfs_iconv: Operation not permitted > > I can see from ktrace that the error comes from some __sysctl call. > > It is sufficient to do at least one mount as root and then > subsequent user mounts are successful. > I've been experiencing the exactly same issue for too long, too. :-(( M.