diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1328,8 +1328,6 @@ safely_chroot(const char *path, uid_t uid) | |||
1328 | 1328 | ||
1329 | } | 1329 | } |
1330 | 1330 | ||
1331 | closefrom(STDERR_FILENO + 1); | ||
1332 | |||
1333 | if (chdir(path) == -1) | 1331 | if (chdir(path) == -1) |
1334 | fatal("Unable to chdir to chroot path \"%s\": " | 1332 | fatal("Unable to chdir to chroot path \"%s\": " |
1335 | "%s", path, strerror(errno)); | 1333 | "%s", path, strerror(errno)); |
@@ -1659,6 +1657,8 @@ do_child(Session *s, const char *command) | |||
1659 | #endif | 1657 | #endif |
1660 | } | 1658 | } |
1661 | 1659 | ||
1660 | closefrom(STDERR_FILENO + 1); | ||
1661 | |||
1662 | if (!options.use_login) | 1662 | if (!options.use_login) |
1663 | do_rc_files(s, shell); | 1663 | do_rc_files(s, shell); |
1664 | 1664 | ||