diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | session.c | 6 |
2 files changed, 8 insertions, 2 deletions
@@ -6,6 +6,10 @@ | |||
6 | - markus@cvs.openbsd.org 2013/03/05 20:16:09 | 6 | - markus@cvs.openbsd.org 2013/03/05 20:16:09 |
7 | [sshconnect2.c] | 7 | [sshconnect2.c] |
8 | reset pubkey order on partial success; ok djm@ | 8 | reset pubkey order on partial success; ok djm@ |
9 | - djm@cvs.openbsd.org 2013/03/06 23:35:23 | ||
10 | [session.c] | ||
11 | fatal() when ChrootDirectory specified by running without root privileges; | ||
12 | ok markus@ | ||
9 | 13 | ||
10 | 20130418 | 14 | 20130418 |
11 | - (djm) [config.guess config.sub] Update to last versions before they switch | 15 | - (djm) [config.guess config.sub] Update to last versions before they switch |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: session.c,v 1.261 2012/12/02 20:46:11 djm Exp $ */ | 1 | /* $OpenBSD: session.c,v 1.262 2013/03/06 23:35:23 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 |
@@ -1529,7 +1529,9 @@ do_setusercontext(struct passwd *pw) | |||
1529 | /* Permanently switch to the desired uid. */ | 1529 | /* Permanently switch to the desired uid. */ |
1530 | permanently_set_uid(pw); | 1530 | permanently_set_uid(pw); |
1531 | #endif | 1531 | #endif |
1532 | } | 1532 | } else if (options.chroot_directory != NULL && |
1533 | strcasecmp(options.chroot_directory, "none") != 0) | ||
1534 | fatal("server lacks privileges to chroot to ChrootDirectory"); | ||
1533 | 1535 | ||
1534 | if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) | 1536 | if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) |
1535 | fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); | 1537 | fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); |