1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Pointy hat: We can't avoid a chown() call without checking both UID

and GID.  Suppress a premature attempt at optimization.
This commit is contained in:
Tim Kientzle 2004-06-05 06:08:40 +00:00
parent 25354e55bf
commit 16847cbdc4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130110

View File

@ -759,9 +759,13 @@ set_ownership(struct archive *a, struct archive_entry *entry, int flags)
gid_t gid;
/* If UID/GID are already correct, return 0. */
/* TODO: Fix this; need to stat() to find on-disk GID <sigh> */
/* XXX TODO: Fix this; as written, this fails to set GID a lot.
* Generally, we'll need to stat() to find on-disk GID <sigh> before
* deciding this. */
/*
if (a->user_uid == archive_entry_stat(entry)->st_uid)
return (0);
*/
/* Not changed. */
if ((flags & ARCHIVE_EXTRACT_OWNER) == 0)