summaryrefslogtreecommitdiffstats
path: root/servconf.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-02-10 12:48:55 +0100
committerDamien Miller <djm@mindrot.org>2008-02-10 12:48:55 +0100
commit54e3773ccb55500087fc722c79869679700dc318 (patch)
tree0cc1094b6c810d313c3d5ad237bd9ce992632487 /servconf.c
parent - djm@cvs.openbsd.org 2008/02/10 09:55:37 (diff)
downloadopenssh-54e3773ccb55500087fc722c79869679700dc318.tar.xz
openssh-54e3773ccb55500087fc722c79869679700dc318.zip
- djm@cvs.openbsd.org 2008/02/10 10:54:29
[servconf.c session.c] delay ~ expansion for ChrootDirectory so it expands to the logged-in user's home, rather than the user who starts sshd (probably root)
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/servconf.c b/servconf.c
index d38d0bfb1..9add96ca1 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: servconf.c,v 1.176 2008/02/08 23:24:08 djm Exp $ */
+/* $OpenBSD: servconf.c,v 1.177 2008/02/10 10:54:28 djm Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -1260,7 +1260,14 @@ parse_flag:
case sChrootDirectory:
charptr = &options->chroot_directory;
- goto parse_filename;
+
+ arg = strdelim(&cp);
+ if (!arg || *arg == '\0')
+ fatal("%s line %d: missing file name.",
+ filename, linenum);
+ if (*activep && *charptr == NULL)
+ *charptr = xstrdup(arg);
+ break;
case sDeprecated:
logit("%s line %d: Deprecated option %s",