Skip to content

Commit

Permalink
archive: enable FIFO extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
jlyo authored and fabled committed Aug 14, 2018
1 parent e1a05c7 commit 1d55b94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/archive.c
Expand Up @@ -300,6 +300,9 @@ int apk_tar_parse(struct apk_istream *is, apk_archive_entry_parser parser,
case '5': /* directory */
entry.mode |= S_IFDIR;
break;
case '6': /* fifo */
entry.mode |= S_IFIFO;
break;
case 'g': /* global pax header */
break;
case 'x': /* file specific pax header */
Expand Down Expand Up @@ -477,11 +480,10 @@ int apk_archive_entry_extract(int atfd, const struct apk_file_info *ae,
if (r < 0) ret = -errno;
atflags |= AT_SYMLINK_NOFOLLOW;
break;
case S_IFSOCK:
case S_IFBLK:
case S_IFCHR:
case S_IFIFO:
r = mknodat(atfd, fn, ae->mode & 07777, ae->device);
r = mknodat(atfd, fn, ae->mode, ae->device);
if (r < 0) ret = -errno;
break;
}
Expand Down

0 comments on commit 1d55b94

Please sign in to comment.