aboutsummaryrefslogtreecommitdiffstats
path: root/src/userinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/userinfo.c')
-rw-r--r--src/userinfo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/userinfo.c b/src/userinfo.c
index a085ff0..b9a47e6 100644
--- a/src/userinfo.c
+++ b/src/userinfo.c
@@ -106,6 +106,8 @@ static int rebuild_uid_cache()
uid_cache_size = 0;
+ setpwent();
+
while (1) {
errno = 0;
pw = getpwent();
@@ -150,6 +152,8 @@ static int rebuild_gid_cache()
qsort(uid_cache, uid_cache_size, sizeof(struct uid_cache_entry), uid_cache_name_sortcmp);
+ setgrent();
+
while (1) {
errno = 0;
gr = getgrent();