diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2010-03-12 11:37:41 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2010-03-12 11:37:41 +0000 |
commit | cda5f29aaed31668fd421f68f917480718bdd63a (patch) | |
tree | ce49823c5b335eff30c30d2ddb80e0e6f56b265e /usr.bin/ssh | |
parent | b0655ba400bace06bf702853ac15266ca5e98143 (diff) |
do not prepend AuthorizedKeysFile with getcwd(), unbreaks relative paths
free() (not xfree()) the buffer returned by getcwd()
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/servconf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 545c4ea49f4..a6d85eba3c4 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/servconf.c @@ -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 @@ -441,7 +441,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; } @@ -1185,7 +1185,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; |