Skip to content

Commit

Permalink
nss-mymachines: follow up on dropping machine_name_is_valid() in favo…
Browse files Browse the repository at this point in the history
…r of hostname_is_valid()
  • Loading branch information
jacekmigacz committed Jan 25, 2022
1 parent acc974c commit 098f092
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nss-mymachines/nss-mymachines.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ enum nss_status _nss_mymachines_getpwnam_r(
return NSS_STATUS_NOTFOUND;

machine = strndupa(p, e - p);
if (!machine_name_is_valid(machine))
if (!hostname_is_valid(machine, 0))
return NSS_STATUS_NOTFOUND;

if (getenv_bool_secure("SYSTEMD_NSS_BYPASS_BUS") > 0)
Expand Down Expand Up @@ -596,7 +596,7 @@ enum nss_status _nss_mymachines_getgrnam_r(
return NSS_STATUS_NOTFOUND;

machine = strndupa(p, e - p);
if (!machine_name_is_valid(machine))
if (!hostname_is_valid(machine, 0))
return NSS_STATUS_NOTFOUND;

if (getenv_bool_secure("SYSTEMD_NSS_BYPASS_BUS") > 0)
Expand Down

0 comments on commit 098f092

Please sign in to comment.