diff options
author | Damien Miller <djm@mindrot.org> | 2010-03-22 05:53:04 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2010-03-22 05:53:04 +1100 |
commit | 4a5f0d325b723dcfdcc540f83ae8a3c08a589d7e (patch) | |
tree | cf54194adac119bf5f65bff59d650c831b96d14b | |
parent | c4cb47bc53434612c41333695b15350724d60d6a (diff) |
- markus@cvs.openbsd.org 2010/03/12 11:37:40
[servconf.c]
do not prepend AuthorizedKeysFile with getcwd(), unbreaks relative paths
free() (not xfree()) the buffer returned by getcwd()
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | servconf.c | 6 |
2 files changed, 7 insertions, 3 deletions
@@ -15,6 +15,10 @@ | |||
15 | [servconf.c] | 15 | [servconf.c] |
16 | unbreak AuthorizedKeys option with a $HOME-relative path; reported by | 16 | unbreak AuthorizedKeys option with a $HOME-relative path; reported by |
17 | vinschen AT redhat.com, ok dtucker@ | 17 | vinschen AT redhat.com, ok dtucker@ |
18 | - markus@cvs.openbsd.org 2010/03/12 11:37:40 | ||
19 | [servconf.c] | ||
20 | do not prepend AuthorizedKeysFile with getcwd(), unbreaks relative paths | ||
21 | free() (not xfree()) the buffer returned by getcwd() | ||
18 | 22 | ||
19 | 20100314 | 23 | 20100314 |
20 | - (djm) [ssh-pkcs11-helper.c] Move #ifdef to after #defines to fix | 24 | - (djm) [ssh-pkcs11-helper.c] Move #ifdef to after #defines to fix |
diff --git a/servconf.c b/servconf.c index e09e0f1c8..fa442bcea 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: servconf.c,v 1.205 2010/03/12 01:06:25 djm Exp $ */ | 1 | /* $OpenBSD: servconf.c,v 1.206 2010/03/12 11:37:40 markus 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 |
@@ -478,7 +478,7 @@ derelativise_path(const char *path) | |||
478 | if ((cwd = getcwd(NULL, 0)) == NULL) | 478 | if ((cwd = getcwd(NULL, 0)) == NULL) |
479 | fatal("%s: getcwd: %s", __func__, strerror(errno)); | 479 | fatal("%s: getcwd: %s", __func__, strerror(errno)); |
480 | xasprintf(&ret, "%s/%s", cwd, expanded); | 480 | xasprintf(&ret, "%s/%s", cwd, expanded); |
481 | xfree(cwd); | 481 | free(cwd); |
482 | xfree(expanded); | 482 | xfree(expanded); |
483 | return ret; | 483 | return ret; |
484 | } | 484 | } |
@@ -1228,7 +1228,7 @@ process_server_config_line(ServerOptions *options, char *line, | |||
1228 | fatal("%s line %d: missing file name.", | 1228 | fatal("%s line %d: missing file name.", |
1229 | filename, linenum); | 1229 | filename, linenum); |
1230 | if (*activep && *charptr == NULL) { | 1230 | if (*activep && *charptr == NULL) { |
1231 | *charptr = derelativise_path(arg); | 1231 | *charptr = tilde_expand_filename(arg, getuid()); |
1232 | /* increase optional counter */ | 1232 | /* increase optional counter */ |
1233 | if (intptr != NULL) | 1233 | if (intptr != NULL) |
1234 | *intptr = *intptr + 1; | 1234 | *intptr = *intptr + 1; |