Skip to content

Commit f43f33d

Browse files
committed
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.
1 parent 802d9a3 commit f43f33d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sshd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2750,8 +2750,10 @@ main(int ac, char **av)
27502750

27512751
/* Chdir to the root directory so that the current disk can be
27522752
unmounted if desired. */
2753+
#ifndef WIN32_FIXME
27532754
if (chdir("/") == -1)
27542755
error("chdir(\"/\"): %s", strerror(errno));
2756+
#endif
27552757

27562758
/* ignore SIGPIPE */
27572759
signal(SIGPIPE, SIG_IGN);

0 commit comments

Comments
 (0)