]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nss-systemd: skip /etc/gshadow look-ups when we just need the GID of a group
authorLennart Poettering <lennart@poettering.net>
Tue, 9 Jun 2020 08:47:43 +0000 (10:47 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 23 Jun 2020 15:24:24 +0000 (17:24 +0200)
src/nss-systemd/nss-systemd.c

index 6a2d9c885ed7b211f329a59790402c6a920dd6fa..e11f917c1981197b78f9aeb0be57cac2e3f4ba69 100644 (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) {