diff options
author | Damien Miller <djm@mindrot.org> | 2008-03-15 07:27:58 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2008-03-15 07:27:58 +0100 |
commit | a19390067474ab3a8ad806dbf551fd84164e78a4 (patch) | |
tree | 3ea30715afb71566bc38b3ba3d0b53ec21e21454 /session.c | |
parent | - (djm) [regress/test-exec.sh] Quote putty-related variables in case they are (diff) | |
download | openssh-a19390067474ab3a8ad806dbf551fd84164e78a4.tar.xz openssh-a19390067474ab3a8ad806dbf551fd84164e78a4.zip |
- (djm) [session.c] Relocate incorrectly-placed closefrom() that was causing
crashes when used with ChrootDirectory
Diffstat (limited to '')
-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) } - closefrom(STDERR_FILENO + 1); - if (chdir(path) == -1) fatal("Unable to chdir to chroot path \"%s\": " "%s", path, strerror(errno)); @@ -1659,6 +1657,8 @@ do_child(Session *s, const char *command) #endif } + closefrom(STDERR_FILENO + 1); + if (!options.use_login) do_rc_files(s, shell); |