diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-02-27 18:05:14 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-02-27 18:05:14 +0900 |
commit | 443876d8dcf3a8cf9abbb04a23a288bf9fc3b7f0 (patch) | |
tree | 9c7e11c7f5b93df5c3fb857914da099517044914 /src/shared | |
parent | 0ffbe10b815970d65a95cc7a1806fa62b8f5a6a3 (diff) | |
download | systemd-443876d8dcf3a8cf9abbb04a23a288bf9fc3b7f0.tar.gz |
userdb: make groupdb_all() always set iterator when it returns >= 0
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/userdb.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/shared/userdb.c b/src/shared/userdb.c index be9af7e8ae..63599e7141 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c @@ -903,15 +903,9 @@ int groupdb_all(UserDBFlags flags, UserDBIterator **ret) { setgrent(); iterator->nss_iterating = true; - goto finish; - } - - if (!FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE)) - goto finish; + } if (r < 0) + return r; - return r; - -finish: *ret = TAKE_PTR(iterator); return 0; } |