diff options
author | Matt Johnston <matt@ucc.asn.au> | 2008-01-13 03:55:59 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2008-01-13 03:55:59 +0000 |
commit | bb0548b3b00ca1b0b06e4d0ccf6cb794337eb192 (patch) | |
tree | 9692d7d32f6e274634af9345f79c1d436b38aed8 /svr-session.c | |
parent | 25554bc331cc684c3521b3c3ed4c0659c454d5df (diff) |
Make a copy of passwd fields since getpwnam()'s retval isn't safe to keep
--HG--
extra : convert_revision : 295b11312e327fe6c4f33512674ea4a1a9790344
Diffstat (limited to 'svr-session.c')
-rw-r--r-- | svr-session.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/svr-session.c b/svr-session.c index 18fab6b..5a8364a 100644 --- a/svr-session.c +++ b/svr-session.c @@ -130,12 +130,12 @@ void svr_dropbear_exit(int exitcode, const char* format, va_list param) { /* user has authenticated */ snprintf(fmtbuf, sizeof(fmtbuf), "exit after auth (%s): %s", - ses.authstate.printableuser, format); - } else if (ses.authstate.printableuser) { + ses.authstate.pw_name, format); + } else if (ses.authstate.pw_name) { /* we have a potential user */ snprintf(fmtbuf, sizeof(fmtbuf), "exit before auth (user '%s', %d fails): %s", - ses.authstate.printableuser, ses.authstate.failcount, format); + ses.authstate.pw_name, ses.authstate.failcount, format); } else { /* before userauth */ snprintf(fmtbuf, sizeof(fmtbuf), |