1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-22 22:03:43 +03:00

sysusers: fix argument confusion in error message

Bug introduced in 335f6ab4f13abcd8073fe84f2a3c70c67271126e. pw/sp are totally
wrong in this context, most likely NULL.

(cherry picked from commit 7e4c61491a720d7a28186cf9e7e144049885a926)
(cherry picked from commit fbb2c5ab19d9b17387a44a87ecec4c085657345c)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-10-13 14:51:28 +02:00 committed by Luca Boccassi
parent 1192ae67cf
commit fe09df464c

View File

@ -498,7 +498,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 */
@ -632,7 +632,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 */