diff options
author | kientzle <kientzle@FreeBSD.org> | 2010-01-23 07:57:17 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2010-01-23 07:57:17 +0000 |
commit | dace1f6d748e9b099a9a3e8799a5cf79d543b256 (patch) | |
tree | 92be3e2003a7ce1af42d1828a08b2c3c503e02dd /lib/libarchive | |
parent | a90eac212e8ef882cb857c3f6c843a88bdcd99be (diff) | |
download | FreeBSD-src-dace1f6d748e9b099a9a3e8799a5cf79d543b256.zip FreeBSD-src-dace1f6d748e9b099a9a3e8799a5cf79d543b256.tar.gz |
Don't try to hardlink block or character device nodes that come out
of cpio archives.
Diffstat (limited to 'lib/libarchive')
-rw-r--r-- | lib/libarchive/archive_entry_link_resolver.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libarchive/archive_entry_link_resolver.c b/lib/libarchive/archive_entry_link_resolver.c index c190108..a5eb624 100644 --- a/lib/libarchive/archive_entry_link_resolver.c +++ b/lib/libarchive/archive_entry_link_resolver.c @@ -181,8 +181,10 @@ archive_entry_linkify(struct archive_entry_linkresolver *res, /* If it has only one link, then we're done. */ if (archive_entry_nlink(*e) == 1) return; - /* Directories never have hardlinks. */ - if (archive_entry_filetype(*e) == AE_IFDIR) + /* Directories, devices never have hardlinks. */ + if (archive_entry_filetype(*e) == AE_IFDIR + || archive_entry_filetype(*e) == AE_IFBLK + || archive_entry_filetype(*e) == AE_IFCHR) return; switch (res->strategy) { |