sysusers: fix argument confusion in error message

Bug introduced in 335f6ab4f1. pw/sp are totally
wrong in this context, most likely NULL.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-10-13 14:51:28 +02:00
parent 9740e677be
commit 7e4c61491a

View File

@@ -511,7 +511,7 @@ static int write_temporary_passwd(const char *passwd_path, FILE **ret_tmpfile, c
r = putpwent_sane(&n, passwd);
if (r < 0)
return log_debug_errno(r, "Failed to add new user \"%s\" to temporary passwd file: %m",
pw->pw_name);
i->name);
}
/* Append the remaining NIS entries if any */
@@ -645,7 +645,7 @@ static int write_temporary_shadow(const char *shadow_path, FILE **ret_tmpfile, c
r = putspent_sane(&n, shadow);
if (r < 0)
return log_debug_errno(r, "Failed to add new user \"%s\" to temporary shadow file: %m",
sp->sp_namp);
i->name);
}
/* Append the remaining NIS entries if any */