Merge pull request #14990 from keszybz/nss-homed-fix

Fix for lookup of groups defined by homed
This commit is contained in:
Yu Watanabe 2020-03-02 15:18:13 +09:00 committed by GitHub
commit ed87ce1d5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@
bool suitable_user_name(const char *name) {
/* Checks whether the specified name is suitable for management via home aread. Note that client-side
/* Checks whether the specified name is suitable for management via homed. Note that client-side
* we usually validate with the simple valid_user_group_name(), while server-side we are a bit more
* restrictive, so that we can change the rules server-side without having to update things
* client-side too. */

View File

@ -195,7 +195,7 @@ enum nss_status _nss_systemd_getgrnam_r(
if (!valid_user_group_name(name))
return NSS_STATUS_NOTFOUND;
/* Synthesize records for root and nobody, in case they are missing form /etc/group */
/* Synthesize records for root and nobody, in case they are missing from /etc/group */
if (getenv_bool_secure("SYSTEMD_NSS_BYPASS_SYNTHETIC") <= 0) {
if (streq(name, root_group.gr_name)) {

View File

@ -290,7 +290,7 @@ enum nss_status userdb_getgrgid(
*errnop = -r;
return NSS_STATUS_UNAVAIL;
}
if (r)
if (!r)
return NSS_STATUS_NOTFOUND;
r = groupdb_by_gid(gid, nss_glue_userdb_flags(), &g);