diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-04-11 16:08:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-11 16:08:33 +0200 |
commit | 2d9123cebddfee7cff3052061517c495c5e359cd (patch) | |
tree | c2af1810cd0baf0ce801e4e26aba63eb2a0649af /src/userdb | |
parent | edc8dd26e27976e0cf06cbf5f97033b3128fc696 (diff) | |
parent | b062ca616c778358d4da008a2950615fac74aa24 (diff) | |
download | systemd-2d9123cebddfee7cff3052061517c495c5e359cd.tar.gz |
Merge pull request #15377 from poettering/userdb-no-shadow
don't try to access shadow from logind
Diffstat (limited to 'src/userdb')
-rw-r--r-- | src/userdb/userwork.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/userdb/userwork.c b/src/userdb/userwork.c index 3bc5ecc1d0..053448a718 100644 --- a/src/userdb/userwork.c +++ b/src/userdb/userwork.c @@ -137,9 +137,9 @@ static int vl_method_get_user_record(Varlink *link, JsonVariant *parameters, Var if (streq_ptr(p.service, "io.systemd.NameServiceSwitch")) { if (uid_is_valid(p.uid)) - r = nss_user_record_by_uid(p.uid, &hr); + r = nss_user_record_by_uid(p.uid, true, &hr); else if (p.user_name) - r = nss_user_record_by_name(p.user_name, &hr); + r = nss_user_record_by_name(p.user_name, true, &hr); else { _cleanup_(json_variant_unrefp) JsonVariant *last = NULL; @@ -324,9 +324,9 @@ static int vl_method_get_group_record(Varlink *link, JsonVariant *parameters, Va if (streq_ptr(p.service, "io.systemd.NameServiceSwitch")) { if (gid_is_valid(p.gid)) - r = nss_group_record_by_gid(p.gid, &g); + r = nss_group_record_by_gid(p.gid, true, &g); else if (p.group_name) - r = nss_group_record_by_name(p.group_name, &g); + r = nss_group_record_by_name(p.group_name, true, &g); else { _cleanup_(json_variant_unrefp) JsonVariant *last = NULL; @@ -467,7 +467,7 @@ static int vl_method_get_memberships(Varlink *link, JsonVariant *parameters, Var const char *last = NULL; char **i; - r = nss_group_record_by_name(p.group_name, &g); + r = nss_group_record_by_name(p.group_name, true, &g); if (r == -ESRCH) return varlink_error(link, "io.systemd.UserDatabase.NoRecordFound", NULL); if (r < 0) |