Use the caller provided (copied) pwent struct in load_public_identity_files
authorbeck <beck@openbsd.org>
Wed, 25 Jul 2018 13:10:56 +0000 (13:10 +0000)
committerbeck <beck@openbsd.org>
Wed, 25 Jul 2018 13:10:56 +0000 (13:10 +0000)
commita2cd80040464220feed141336653bbde9593859f
tree4acdffea5eb41e26036045008a3c2c186076dce6
parent8ceac8e98e777acef2b1bed288940d770009ae53
Use the caller provided (copied) pwent struct in load_public_identity_files
instead of calling getpwuid() again and discarding the argument.
This prevents a client crash where tilde_expand_filename calls getpwuid()
again before the pwent pointer is used.
Issue noticed and reported by Pierre-Olivier Martel <pom@apple.com>
ok djm@ deraadt@
usr.bin/ssh/ssh.c