Date: Sat, 7 Mar 2009 03:00:45 +0000 (UTC) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r189479 - head/lib/libarchive Message-ID: <200903070300.n2730jOf036577@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kientzle Date: Sat Mar 7 03:00:44 2009 New Revision: 189479 URL: http://svn.freebsd.org/changeset/base/189479 Log: Merge r723 from libarchive.googlecode.com: Don't try to restore owner or SUID bits on Windows; just ignore them. Modified: head/lib/libarchive/archive_write_disk.c Modified: head/lib/libarchive/archive_write_disk.c ============================================================================== --- head/lib/libarchive/archive_write_disk.c Sat Mar 7 02:58:15 2009 (r189478) +++ head/lib/libarchive/archive_write_disk.c Sat Mar 7 03:00:44 2009 (r189479) @@ -414,8 +414,10 @@ _archive_write_header(struct archive *_a a->mode &= ~S_ISVTX; a->mode &= ~a->user_umask; } +#ifndef _WIN32 if (a->flags & ARCHIVE_EXTRACT_OWNER) a->todo |= TODO_OWNER; +#endif if (a->flags & ARCHIVE_EXTRACT_TIME) a->todo |= TODO_TIMES; if (a->flags & ARCHIVE_EXTRACT_ACL) @@ -1942,6 +1944,7 @@ set_mode(struct archive_write_disk *a, i return (r); if (a->pst->st_gid != a->gid) { mode &= ~ S_ISGID; +#ifndef _WIN32 if (a->flags & ARCHIVE_EXTRACT_OWNER) { /* * This is only an error if you @@ -1954,16 +1957,19 @@ set_mode(struct archive_write_disk *a, i "Can't restore SGID bit"); r = ARCHIVE_WARN; } +#endif } /* While we're here, double-check the UID. */ if (a->pst->st_uid != a->uid && (a->todo & TODO_SUID)) { mode &= ~ S_ISUID; +#ifndef _WIN32 if (a->flags & ARCHIVE_EXTRACT_OWNER) { archive_set_error(&a->archive, -1, "Can't restore SUID bit"); r = ARCHIVE_WARN; } +#endif } a->todo &= ~TODO_SGID_CHECK; a->todo &= ~TODO_SUID_CHECK; @@ -1975,11 +1981,13 @@ set_mode(struct archive_write_disk *a, i */ if (a->user_uid != a->uid) { mode &= ~ S_ISUID; +#ifndef _WIN32 if (a->flags & ARCHIVE_EXTRACT_OWNER) { archive_set_error(&a->archive, -1, "Can't make file SUID"); r = ARCHIVE_WARN; } +#endif } a->todo &= ~TODO_SUID_CHECK; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903070300.n2730jOf036577>