Commit abe925f8 authored by Jesse Young's avatar Jesse Young Committed by Timo Teräs

archive: enable FIFO extraction

(cherry picked from commit 1d55b948)
parent 70deb0aa
...@@ -287,6 +287,9 @@ int apk_tar_parse(struct apk_istream *is, apk_archive_entry_parser parser, ...@@ -287,6 +287,9 @@ int apk_tar_parse(struct apk_istream *is, apk_archive_entry_parser parser,
case '5': /* directory */ case '5': /* directory */
entry.mode |= S_IFDIR; entry.mode |= S_IFDIR;
break; break;
case '6': /* fifo */
entry.mode |= S_IFIFO;
break;
case 'g': /* global pax header */ case 'g': /* global pax header */
break; break;
case 'x': /* file specific pax header */ case 'x': /* file specific pax header */
...@@ -464,11 +467,10 @@ int apk_archive_entry_extract(int atfd, const struct apk_file_info *ae, ...@@ -464,11 +467,10 @@ int apk_archive_entry_extract(int atfd, const struct apk_file_info *ae,
if (r < 0) ret = -errno; if (r < 0) ret = -errno;
atflags |= AT_SYMLINK_NOFOLLOW; atflags |= AT_SYMLINK_NOFOLLOW;
break; break;
case S_IFSOCK:
case S_IFBLK: case S_IFBLK:
case S_IFCHR: case S_IFCHR:
case S_IFIFO: 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; if (r < 0) ret = -errno;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment