From owner-freebsd-current@FreeBSD.ORG Wed Dec 1 21:48:19 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3A9216A4CE; Wed, 1 Dec 2004 21:48:19 +0000 (GMT) Received: from mail.evip.pl (mail.evip.com.pl [212.244.157.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id C157743D1D; Wed, 1 Dec 2004 21:48:18 +0000 (GMT) (envelope-from w@evip.pl) Received: from drwebc by mail.evip.pl with drweb-scanned (Exim 4.22) id 1CZcKY-000Cmv-Kv; Wed, 01 Dec 2004 22:48:10 +0100 Received: from w by mail.evip.pl with local (Exim 4.22) id 1CZcKY-000Cmp-HT; Wed, 01 Dec 2004 22:48:10 +0100 Date: Wed, 1 Dec 2004 22:48:10 +0100 From: Wiktor Niesiobedzki To: animecowboy@animecowboy.com Message-ID: <20041201214810.GM63554@mail.evip.pl> References: <1101874345.41ad44a92983e@www.animecowboy.com> <20041201091330.F655@beagle.kn.op.dlr.de> <1101932917.41ae2975cbb94@www.animecowboy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1101932917.41ae2975cbb94@www.animecowboy.com> User-Agent: Mutt/1.5.6i cc: Harti Brandt cc: current Subject: Re: smbfs and setuid in 5.3 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2004 21:48:19 -0000 On Wed, Dec 01, 2004 at 02:28:37PM -0600, animecowboy@animecowboy.com wrote: > > Try to use the -u and -g switches to mount_smbfs to specify the user > > that should access the mounted file system. > > > > harti > > > > The base directory was already set to the user/group I wanted, makeing the > defaults to -u -g what I wanted. So as an experiement I set the base dir to > root:wheel, and used the -u -g attribs. > I can easily reproduce that: Amnesiac# mkdir /testmount Amnesiac# chown w /testmount Amnesiac# chmod 700 /testmount Amnesiac# mount_smbfs //w@portal/share /testmount Password: Amnesiac# ls /testmount .snap bea oracle Amnesiac# ls /testmount/.snap Amnesiac# su - w w@Amnesiac:~$ ls /testmount ls: testmount: Permission denied w@Amnesiac:~$ I think that smbfs is the only FS that does not change the mountpoint access mode, what may I expose a more global problem. But quickly scanning the sourcecode, I still cannot find the source of the problem. And one question arising: w@Amnesiac:~$ kdump| grep -c NAMI 11 w@Amnesiac:~$ ktrace -t n ls /testmount >/dev/null 2>/dev/null w@Amnesiac:~$ kdump| grep -c NAMI 18 Where from this change of calls to NAMI stems? The second output has follwing lines more (at the end of execution): 1750 ls NAMI "/etc/malloc.conf" 1750 ls NAMI "/testmount" 1750 ls NAMI "." 1750 ls NAMI "/testmount" 1750 ls NAMI "/testmount" 1750 ls NAMI "/testmount" 1750 ls NAMI "/testmount" Cheers, Wiktor Niesiobedzki