summaryrefslogtreecommitdiff
path: root/src/io.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-10-08 16:09:03 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-10-08 16:09:03 +0300
commit6398d338c6441f3b967a2633bbc9df4709bcb258 (patch)
tree851729b8c819ad15c62e066953407c24814bad6e /src/io.c
parent19419f1a88285a0dee53bdf49201c4d3d4cbf19f (diff)
downloadapk-tools-6398d338c6441f3b967a2633bbc9df4709bcb258.tar.gz
apk-tools-6398d338c6441f3b967a2633bbc9df4709bcb258.tar.bz2
apk-tools-6398d338c6441f3b967a2633bbc9df4709bcb258.tar.xz
apk-tools-6398d338c6441f3b967a2633bbc9df4709bcb258.zip
db: fix the previous commit
id cache needs to be initialized early. and group database filename is surprisingly 'group'.
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/io.c b/src/io.c
index 38bc4e6..0f09403 100644
--- a/src/io.c
+++ b/src/io.c
@@ -838,7 +838,7 @@ uid_t apk_resolve_gid(struct apk_id_cache *idc, const char *groupname, uid_t def
ci->genid = idc->genid;
ci->gid = -1;
- in = fdopen(openat(idc->root_fd, "etc/passwd", O_RDONLY|O_CLOEXEC), "r");
+ in = fdopen(openat(idc->root_fd, "etc/group", O_RDONLY|O_CLOEXEC), "r");
if (in != NULL) {
do {
fgetgrent_r(in, &grent, buf, sizeof(buf), &grp);