diff options
author | Damien Miller <djm@mindrot.org> | 2008-03-07 18:33:12 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2008-03-07 18:33:12 +1100 |
commit | 7cb2b56b1c7e5d0824edc507b01cd78a01019590 (patch) | |
tree | ad50ee74daf61a4bb7d4c583e667de5f139cb79a | |
parent | 767087b8ec996d690bbbed19279454e017418643 (diff) |
- 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).
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | session.c | 8 |
2 files changed, 8 insertions, 6 deletions
@@ -17,6 +17,10 @@ | |||
17 | - markus@cvs.openbsd.org 2008/02/20 15:25:26 | 17 | - markus@cvs.openbsd.org 2008/02/20 15:25:26 |
18 | [session.c] | 18 | [session.c] |
19 | correct boolean encoding for coredump; der Mouse via dugsong | 19 | correct boolean encoding for coredump; der Mouse via dugsong |
20 | - djm@cvs.openbsd.org 2008/02/22 05:58:56 | ||
21 | [session.c] | ||
22 | closefrom() call was too early, delay it until just before we execute | ||
23 | the user's rc files (if any). | ||
20 | 24 | ||
21 | 20080302 | 25 | 20080302 |
22 | - (dtucker) [configure.ac] FreeBSD's glob() doesn't behave the way we expect | 26 | - (dtucker) [configure.ac] FreeBSD's glob() doesn't behave the way we expect |
@@ -3677,4 +3681,4 @@ | |||
3677 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 3681 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
3678 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 3682 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
3679 | 3683 | ||
3680 | $Id: ChangeLog,v 1.4854 2008/03/07 07:32:42 djm Exp $ | 3684 | $Id: ChangeLog,v 1.4855 2008/03/07 07:33:12 djm Exp $ |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: session.c,v 1.229 2008/02/20 15:25:26 markus Exp $ */ | 1 | /* $OpenBSD: session.c,v 1.230 2008/02/22 05:58:56 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
4 | * All rights reserved | 4 | * All rights reserved |
@@ -488,8 +488,6 @@ do_exec_no_pty(Session *s, const char *command) | |||
488 | cray_init_job(s->pw); /* set up cray jid and tmpdir */ | 488 | cray_init_job(s->pw); /* set up cray jid and tmpdir */ |
489 | #endif | 489 | #endif |
490 | 490 | ||
491 | closefrom(STDERR_FILENO + 1); | ||
492 | |||
493 | /* Do processing for the child (exec command etc). */ | 491 | /* Do processing for the child (exec command etc). */ |
494 | do_child(s, command); | 492 | do_child(s, command); |
495 | /* NOTREACHED */ | 493 | /* NOTREACHED */ |
@@ -610,8 +608,6 @@ do_exec_pty(Session *s, const char *command) | |||
610 | # endif | 608 | # endif |
611 | #endif | 609 | #endif |
612 | 610 | ||
613 | closefrom(STDERR_FILENO + 1); | ||
614 | |||
615 | /* Do common processing for the child, such as execing the command. */ | 611 | /* Do common processing for the child, such as execing the command. */ |
616 | do_child(s, command); | 612 | do_child(s, command); |
617 | /* NOTREACHED */ | 613 | /* NOTREACHED */ |
@@ -1345,6 +1341,8 @@ safely_chroot(const char *path, uid_t uid) | |||
1345 | 1341 | ||
1346 | } | 1342 | } |
1347 | 1343 | ||
1344 | closefrom(STDERR_FILENO + 1); | ||
1345 | |||
1348 | if (chdir(path) == -1) | 1346 | if (chdir(path) == -1) |
1349 | fatal("Unable to chdir to chroot path \"%s\": " | 1347 | fatal("Unable to chdir to chroot path \"%s\": " |
1350 | "%s", path, strerror(errno)); | 1348 | "%s", path, strerror(errno)); |