]> andersk Git - openssh.git/commitdiff
- djm@cvs.openbsd.org 2008/02/22 05:58:56
authordjm <djm>
Fri, 7 Mar 2008 07:33:12 +0000 (07:33 +0000)
committerdjm <djm>
Fri, 7 Mar 2008 07:33:12 +0000 (07:33 +0000)
     [session.c]
     closefrom() call was too early, delay it until just before we execute
     the user's rc files (if any).

ChangeLog
session.c

index 63f17a911d7c47e54ee3347f4749b43aea94a14c..5a7b63b49e37c421950cd441a1dc72492b435bb2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
    - markus@cvs.openbsd.org 2008/02/20 15:25:26
      [session.c]
      correct boolean encoding for coredump; der Mouse via dugsong
+   - djm@cvs.openbsd.org 2008/02/22 05:58:56
+     [session.c]
+     closefrom() call was too early, delay it until just before we execute
+     the user's rc files (if any).
 
 20080302
  - (dtucker) [configure.ac] FreeBSD's glob() doesn't behave the way we expect
index 7a97ae8d6a54da95ad01e6a2243405e954e673dd..3eba513de62d96a1afc1ee222d5f4b9ff545b795 100644 (file)
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.229 2008/02/20 15:25:26 markus Exp $ */
+/* $OpenBSD: session.c,v 1.230 2008/02/22 05:58:56 djm Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -488,8 +488,6 @@ do_exec_no_pty(Session *s, const char *command)
                cray_init_job(s->pw); /* set up cray jid and tmpdir */
 #endif
 
-               closefrom(STDERR_FILENO + 1);
-
                /* Do processing for the child (exec command etc). */
                do_child(s, command);
                /* NOTREACHED */
@@ -610,8 +608,6 @@ do_exec_pty(Session *s, const char *command)
 # endif
 #endif
 
-               closefrom(STDERR_FILENO + 1);
-
                /* Do common processing for the child, such as execing the command. */
                do_child(s, command);
                /* NOTREACHED */
@@ -1345,6 +1341,8 @@ 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));
This page took 0.132744 seconds and 5 git commands to generate.