Fix sshd.log file to be created in the correct place

sshd.log of child was created in root / directory. It should be in the
directory where sshd.exe binary is located. Otherwise logged data were
not being found in the central sshd.log file where user's expect.
This commit is contained in:
quamrulmina 2016-01-29 02:53:53 -06:00
parent 802d9a3349
commit f43f33da8b

2
sshd.c
View File

@ -2750,8 +2750,10 @@ main(int ac, char **av)
/* Chdir to the root directory so that the current disk can be
unmounted if desired. */
#ifndef WIN32_FIXME
if (chdir("/") == -1)
error("chdir(\"/\"): %s", strerror(errno));
#endif
/* ignore SIGPIPE */
signal(SIGPIPE, SIG_IGN);