diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-08-07 02:50:05 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-08-07 02:50:05 +0000 |
commit | 1f65e2392cd4804c7a7ee4f02c81dbb21584e642 (patch) | |
tree | 6fe6ae000eb0b6eca42afde88b2099a412d733bd /lib/libarchive | |
parent | 2f7b443faf678c628b87e6722a418f2016de4f19 (diff) | |
download | FreeBSD-src-1f65e2392cd4804c7a7ee4f02c81dbb21584e642.zip FreeBSD-src-1f65e2392cd4804c7a7ee4f02c81dbb21584e642.tar.gz |
Pass the pointy hat, please: Don't blow away the high-order
mode bits when setting permissions from ACL data.
Thanks to: David Gilbert for first reporting this and
Jimmy Olgeni for noticing that it only occurred on
ACL-enabled filesystems.
Diffstat (limited to 'lib/libarchive')
-rw-r--r-- | lib/libarchive/archive_entry.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libarchive/archive_entry.c b/lib/libarchive/archive_entry.c index 737eb4a..a88950a 100644 --- a/lib/libarchive/archive_entry.c +++ b/lib/libarchive/archive_entry.c @@ -732,15 +732,15 @@ acl_special(struct archive_entry *entry, int type, int permset, int tag) if (type == ARCHIVE_ENTRY_ACL_TYPE_ACCESS) { switch (tag) { case ARCHIVE_ENTRY_ACL_USER_OBJ: - entry->ae_stat.st_mode &= 0077; + entry->ae_stat.st_mode &= ~0700; entry->ae_stat.st_mode |= (permset & 7) << 6; return (0); case ARCHIVE_ENTRY_ACL_GROUP_OBJ: - entry->ae_stat.st_mode &= 0707; + entry->ae_stat.st_mode &= ~0070; entry->ae_stat.st_mode |= (permset & 7) << 3; return (0); case ARCHIVE_ENTRY_ACL_OTHER: - entry->ae_stat.st_mode &= 0770; + entry->ae_stat.st_mode &= ~0007; entry->ae_stat.st_mode |= permset & 7; return (0); } |