diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2020-04-13 13:00:41 +0300 |
---|---|---|
committer | Martin Pärtel <martin.partel@gmail.com> | 2020-04-13 13:00:41 +0300 |
commit | 82050fa3e903d4c26f4277e2845a901c671d22b8 (patch) | |
tree | 10ecaae1cba9a1b8cc5d939be669fea9e63880c4 /src/userinfo.c | |
parent | d18920e62357d8ef53c160d32ed4b173b1860b9a (diff) | |
download | bindfs-82050fa3e903d4c26f4277e2845a901c671d22b8.tar.gz |
Call setpwent() and setgrent().
Docs aren't super clear about whether endpwent() and endgrent()
do the same.
Diffstat (limited to 'src/userinfo.c')
-rw-r--r-- | src/userinfo.c | 4 |
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(); |