From owner-freebsd-current@FreeBSD.ORG Sun Aug 15 22:21:49 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 DCF8416A4CE for ; Sun, 15 Aug 2004 22:21:49 +0000 (GMT) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF56F43D31 for ; Sun, 15 Aug 2004 22:21:46 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from freebsd.org (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id i7FMLk90069729; Sun, 15 Aug 2004 15:21:46 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <411FE1FA.5070703@freebsd.org> Date: Sun, 15 Aug 2004 15:21:46 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Kennaway References: <20040813235434.GA75875@xor.obsecurity.org> <20040814063541.GA43063@xor.obsecurity.org> <411FCCCC.8040508@freebsd.org> <20040815205946.GA18580@xor.obsecurity.org> In-Reply-To: <20040815205946.GA18580@xor.obsecurity.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: Re: bsdtar's security restrictions (was Re: Spurious EACCES errors from apache) 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: Sun, 15 Aug 2004 22:21:50 -0000 Kris Kennaway wrote: > On Sun, Aug 15, 2004 at 01:51:24PM -0700, Tim Kientzle wrote: > >>>This is bad when some of those directories >>>already exist, because other processes trying to access files in the >>>directory hierarchy may lose the race and fail. >> >>Give me some more details about your situation and I'll >>see what I can come up with. > > I pull in packages from package build clients with > ssh client tar | tar. It creates archives like this: > > packages > packages/All > packages/All/uzap-1.0.tgz > packages/editors > packages/editors/uzap-1.0.tgz > packages/Latest > packages/Latest/uzap.tgz > > packages/ is supposed to have these permissions: > > drwxr-xr-x 93 ports-i386 portmgr 2048 Aug 14 23:12 packages/ > > But while the archive is being extracted it is changed to > > drwx------ 93 ports-i386 portmgr 2048 Aug 14 23:12 packages/ If you can change it to contain only the files (and not the directories), then this should no longer be a problem. As I mentioned earlier, the editing of dir permissions is done for "packages/" here because it's explicitly listed as an archive entry. In the meantime, I'll see about adding an option to relax the security constraints for situations like this. Tim