From: Serge Hallyn Date: Thu, 22 Dec 2022 23:54:51 +0000 (-0600) Subject: chfn: new_fields: fix wrong fields printed X-Git-Tag: 4.14.0-rc1~238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc18c184e56ff9aa6b092b01116b46cea4f34492;p=thirdparty%2Fshadow.git chfn: new_fields: fix wrong fields printed When the caller may not change the room number, work phone, or home number, then rather than prompting for the new one it will print the existing one. But due to a typo it printed the full name in place of each of those. Fix the fields being printed. Signed-off-by: Serge Hallyn --- diff --git a/src/chfn.c b/src/chfn.c index 1c2f1cce0..b1793e183 100644 --- a/src/chfn.c +++ b/src/chfn.c @@ -175,19 +175,19 @@ static void new_fields (void) if (may_change_field ('r')) { change_field (roomno, sizeof roomno, _("Room Number")); } else { - printf (_("\t%s: %s\n"), _("Room Number"), fullnm); + printf (_("\t%s: %s\n"), _("Room Number"), roomno); } if (may_change_field ('w')) { change_field (workph, sizeof workph, _("Work Phone")); } else { - printf (_("\t%s: %s\n"), _("Work Phone"), fullnm); + printf (_("\t%s: %s\n"), _("Work Phone"), workph); } if (may_change_field ('h')) { change_field (homeph, sizeof homeph, _("Home Phone")); } else { - printf (_("\t%s: %s\n"), _("Home Phone"), fullnm); + printf (_("\t%s: %s\n"), _("Home Phone"), homeph); } if (amroot) {