Date: Wed, 07 Jul 2004 22:41:33 -0700 From: Tim Kientzle <kientzle@freebsd.org> To: Tim Kientzle <kientzle@freebsd.org> Cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libarchive archive_read_extract.c Message-ID: <40ECDE8D.8050406@freebsd.org> In-Reply-To: <200407080524.i685Omoa096806@repoman.freebsd.org> References: <200407080524.i685Omoa096806@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Tim Kientzle wrote: > 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. <whew!> 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 Though I freely admit this is all pretty much academic, some test files that illustrate these issues are available at: http://people.freebsd.org/~kientzle/libarchive/test/ Tim P.S. While playing with umask=777, I discovered a few annoying nits: cvs erases it's own Entries file; chmod -R and rm -rf both fail on non-readable dirs.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40ECDE8D.8050406>