nss-systemd: skip /etc/gshadow look-ups when we just need the GID of a group

This commit is contained in:
Lennart Poettering 2020-06-09 10:47:43 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 88d775b734
commit 6e78726e20
1 changed files with 1 additions and 1 deletions

View File

@ -581,7 +581,7 @@ enum nss_status _nss_systemd_initgroups_dyn(
/* The group might be defined via traditional NSS only, hence let's do a full look-up without
* disabling NSS. This means we are operating recursively here. */
r = groupdb_by_name(group_name, nss_glue_userdb_flags() & ~USERDB_AVOID_NSS, &g);
r = groupdb_by_name(group_name, (nss_glue_userdb_flags() & ~USERDB_AVOID_NSS) | USERDB_AVOID_SHADOW, &g);
if (r == -ESRCH)
continue;
if (r < 0) {