From owner-cvs-all@FreeBSD.ORG Thu Jul 8 05:24:48 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A00816A4CE; Thu, 8 Jul 2004 05:24:48 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5258443D2F; Thu, 8 Jul 2004 05:24:48 +0000 (GMT) (envelope-from kientzle@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i685Om3Y096807; Thu, 8 Jul 2004 05:24:48 GMT (envelope-from kientzle@repoman.freebsd.org) Received: (from kientzle@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i685Omoa096806; Thu, 8 Jul 2004 05:24:48 GMT (envelope-from kientzle) Message-Id: <200407080524.i685Omoa096806@repoman.freebsd.org> From: Tim Kientzle Date: Thu, 8 Jul 2004 05:24:48 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libarchive archive_read_extract.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2004 05:24:48 -0000 kientzle 2004-07-08 05:24:48 UTC FreeBSD src repository Modified files: lib/libarchive archive_read_extract.c Log: I think this is my fourth complete rewrite of the dir-creation code. This version handles all of the following edge cases: * Restoring explicit dirs with 000 permissions (star fails this test) * Restore of implicit or explicit dirs when umask=777 (gtar and star both fail this test) * Restoring dir paths containing "." and ".." components This version initially creates all dirs with permission 700 (ignoring umask), then does a post-extract "fixup" pass to set the correct permissions (which may or may not depend on umask, depending on the restore flags and whether it's an explicit or implicit dir). Permissions are restored depth-first so that permissions within non-writable dirs can be correctly restored. (The depth-sorting does correctly account for dirs with ".." components.) Revision Changes Path 1.29 +212 -138 src/lib/libarchive/archive_read_extract.c