From 7e4c61491a720d7a28186cf9e7e144049885a926 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 13 Oct 2022 14:51:28 +0200 Subject: [PATCH] sysusers: fix argument confusion in error message Bug introduced in 335f6ab4f13abcd8073fe84f2a3c70c67271126e. pw/sp are totally wrong in this context, most likely NULL. --- src/sysusers/sysusers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c index c16cff35a26..5aaaf609b2c 100644 --- a/src/sysusers/sysusers.c +++ b/src/sysusers/sysusers.c @@ -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 */ -- 2.47.3