summaryrefslogtreecommitdiff
path: root/src/archive.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-10-08 15:36:54 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-10-08 15:36:54 +0300
commit19419f1a88285a0dee53bdf49201c4d3d4cbf19f (patch)
treef8221675060919509e2bef32d2fb5b68df05cddd /src/archive.c
parenta31948ae2640986b8a012b20e2a188ce0fea2cc2 (diff)
downloadapk-tools-19419f1a88285a0dee53bdf49201c4d3d4cbf19f.tar.gz
apk-tools-19419f1a88285a0dee53bdf49201c4d3d4cbf19f.tar.bz2
apk-tools-19419f1a88285a0dee53bdf49201c4d3d4cbf19f.tar.xz
apk-tools-19419f1a88285a0dee53bdf49201c4d3d4cbf19f.zip
io, db: id cache should be specific to database root, not system root
Otherwise we end up using wrong uid/gid mappings when doing install to alternate system root. Fixes #434.
Diffstat (limited to 'src/archive.c')
-rw-r--r--src/archive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/archive.c b/src/archive.c
index b60b3b2..6e555b4 100644
--- a/src/archive.c
+++ b/src/archive.c
@@ -117,7 +117,7 @@ static void tar_entry_close(void *stream)
}
int apk_tar_parse(struct apk_istream *is, apk_archive_entry_parser parser,
- void *ctx, int soft_checksums)
+ void *ctx, int soft_checksums, struct apk_id_cache *idc)
{
struct apk_file_info entry;
struct apk_tar_entry_istream teis = {
@@ -146,8 +146,8 @@ int apk_tar_parse(struct apk_istream *is, apk_archive_entry_parser parser,
entry = (struct apk_file_info){
.size = GET_OCTAL(buf.size),
- .uid = apk_resolve_uid(buf.uname, GET_OCTAL(buf.uid)),
- .gid = apk_resolve_gid(buf.gname, GET_OCTAL(buf.gid)),
+ .uid = apk_resolve_uid(idc, buf.uname, GET_OCTAL(buf.uid)),
+ .gid = apk_resolve_gid(idc, buf.gname, GET_OCTAL(buf.gid)),
.mode = GET_OCTAL(buf.mode) & 07777,
.mtime = GET_OCTAL(buf.mtime),
.name = entry.name,