1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-09-08 15:12:05 +03:00
Files
libssh/tests/unittests
Theo Buehler 33be8038fe Unbreak torture_config_make_absolute() on OpenBSD
The torture_config_make_absolute() and its _no_sshdir() version both
segfault on OpenBSD. The reason for this is that the storage returned
by getpwuid() is backed by mmap and is unapped by the getpwnam() call
in ssh_path_expand_tilde(), so a later access to home segfaults. The
possibility of this happening (getpwnam() overwriting values returned
by getpwuid()) is explicitly called out in POSIX.

A simple fix is to work with copies of username and homedir.

Signed-off-by: Theo Buehler <tb@openbsd.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit ccb8cf88c8)
2025-08-08 11:22:05 +02:00
..
2024-03-22 12:35:07 +01:00
2023-02-02 14:49:06 +01:00
2023-02-02 14:49:06 +01:00
2023-02-02 14:49:06 +01:00