diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2008-02-10 10:54:30 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2008-02-10 10:54:30 +0000 |
commit | d364b7cd22c393722dfd4749339b88d20b47c823 (patch) | |
tree | 3261d4e031baa14ddde5616c27d391da7c9f1ef6 /usr.bin/ssh/servconf.c | |
parent | 03bbf97fef7fd2dc33cff76d13c46df4b67f86de (diff) |
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 'usr.bin/ssh/servconf.c')
-rw-r--r-- | usr.bin/ssh/servconf.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 9282d43ebd9..899aa30c603 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/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 @@ -1217,7 +1217,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", |