diff options
author | djm <djm> | 2010-03-21 18:53:04 +0000 |
---|---|---|
committer | djm <djm> | 2010-03-21 18:53:04 +0000 |
commit | 656cd813da85a36ee1001849842121b7d6c0aa6b (patch) | |
tree | a904f4ead9aca754b197edc1cb93549d00b536f7 /servconf.c | |
parent | d61fec90cf3b7439fecc453a4a4f8608f23decf3 (diff) | |
download | openssh-656cd813da85a36ee1001849842121b7d6c0aa6b.tar.gz |
- 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()
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.205 2010/03/12 01:06:25 djm Exp $ */ +/* $OpenBSD: servconf.c,v 1.206 2010/03/12 11:37:40 markus Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * All rights reserved @@ -478,7 +478,7 @@ derelativise_path(const char *path) if ((cwd = getcwd(NULL, 0)) == NULL) fatal("%s: getcwd: %s", __func__, strerror(errno)); xasprintf(&ret, "%s/%s", cwd, expanded); - xfree(cwd); + free(cwd); xfree(expanded); return ret; } @@ -1228,7 +1228,7 @@ process_server_config_line(ServerOptions *options, char *line, fatal("%s line %d: missing file name.", filename, linenum); if (*activep && *charptr == NULL) { - *charptr = derelativise_path(arg); + *charptr = tilde_expand_filename(arg, getuid()); /* increase optional counter */ if (intptr != NULL) *intptr = *intptr + 1; |