mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Don't try to hardlink block or character device nodes that come out
of cpio archives.
This commit is contained in:
parent
54d2369731
commit
e066c90bb2
1 changed files with 4 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue