summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Young <jlyo@jlyo.org>2018-08-14 12:32:09 -0500
committerTimo Teräs <timo.teras@iki.fi>2018-09-06 14:46:28 +0300
commitabe925f864e38a095ab26b0cbcb4b74d60d667ee (patch)
tree6d317603402c38741b6612985641f79c46b9c353
parent70deb0aa595a9a45b0628738eb196666b8ac03f8 (diff)
downloadapk-tools-abe925f864e38a095ab26b0cbcb4b74d60d667ee.tar.bz2
apk-tools-abe925f864e38a095ab26b0cbcb4b74d60d667ee.tar.xz
archive: enable FIFO extraction
(cherry picked from commit 1d55b9488f2d9c6d367fa7f21b058466c24f3ad1)
-rw-r--r--src/archive.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/archive.c b/src/archive.c
index f84e440..383730b 100644
--- a/src/archive.c
+++ b/src/archive.c
@@ -287,6 +287,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 */
@@ -464,11 +467,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;
}