From owner-freebsd-current@FreeBSD.ORG Fri Dec 26 02:25:28 2003 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 5060016A4CE for ; Fri, 26 Dec 2003 02:25:28 -0800 (PST) Received: from smtp02.syd.iprimus.net.au (smtp02.syd.iprimus.net.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id E24DB43D2D for ; Fri, 26 Dec 2003 02:25:26 -0800 (PST) (envelope-from tjr@freebsd.org) Received: from freebsd.org (210.50.81.147) by smtp02.syd.iprimus.net.au (7.0.020) id 3F8F522A01603A54; Fri, 26 Dec 2003 21:24:15 +1100 Message-ID: <3FEC0C6F.7010409@freebsd.org> Date: Fri, 26 Dec 2003 21:24:47 +1100 From: Tim Robbins User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: BSDC References: <20031226092650.GA60329@Amber.XtremeDev.com> In-Reply-To: <20031226092650.GA60329@Amber.XtremeDev.com> Content-Type: multipart/mixed; boundary="------------010405030605070606040405" cc: current@freebsd.org Subject: Re: unionfs on ufs2 gives "operation not supported" 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: Fri, 26 Dec 2003 10:25:28 -0000 This is a multi-part message in MIME format. --------------010405030605070606040405 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit BSDC wrote: >Getting "operation not supported" messages on a long ls listing with >unionfs mounts. Trying to setup a jail using unionfs, has anyone any >ideas why I'm seeing this with ls? > ># mount >/dev/da0s1a on / (ufs, local, noatime, soft-updates, acls) >devfs on /dev (devfs, local, multilabel) >/dev/vinum/usr on /usr (ufs, NFS exported, local, noatime, soft-updates, acls) >/dev/vinum/var on /var (ufs, local, noatime, soft-updates, acls) >:/usr/jail/template on /usr/jail/172.16.1.1 (unionfs, noatime, noclusterw, acls) >^^^^^^^ > ># ls -l /usr/jail/172.16.1.1/ >ls: /usr/jail/172.16.1.1/.cshrc: Operation not supported >-rw-r--r-- 2 root wheel 797 Dec 24 03:04 .cshrc >ls: /usr/jail/172.16.1.1/.profile: Operation not supported >-rw-r--r-- 2 root wheel 251 Dec 24 03:04 .profile > > The problem seems to be that ls is performing a pathconf(2) _PC_ACL_EXTENDED request on the file to determine whether ACLs are supported on the file, and this request is getting passed down from unionfs to one of the UFS layers, which is indicating that ACLs are supported, but unionfs does not actually support ACLs. I've attached an (untested) patch that should make unionfs reject _PC_ACL_EXTENDED. Access to files should still be controlled by the ACLs, but you won't be able to query or modify them through unionfs. Let me know if this patch works & I'll see if I can get proper ACL support implemented. Tim --------------010405030605070606040405 Content-Type: text/plain; name="unionfs-acl.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="unionfs-acl.diff" ==== //depot/user/tjr/freebsd-tjr/src/sys/fs/unionfs/union_vnops.c#5 - /p4/src/sys/fs/unionfs/union_vnops.c ==== @@ -51,6 +51,7 @@ #include #include #include +#include #include #include @@ -1780,6 +1781,9 @@ struct union_node *un = VTOUNION(ap->a_vp); struct vnode *vp; + if (ap->a_name == _PC_ACL_EXTENDED) + return (EINVAL); + vp = union_lock_other(un, td); KASSERT(vp != NULL, ("union_pathconf: backing vnode missing!")); --------------010405030605070606040405--