summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2010-04-16 10:25:59 +0100
committerColin Watson <cjwatson@debian.org>2010-04-16 10:25:59 +0100
commit716621abf50722a46f97ecafed5ce134c94f1a81 (patch)
tree9993f08b7ea89f3038c3cfcf8fd1c71bdc7e7ae7 /servconf.c
parentae31b42e02d7bf7004ec0302088f4e169c0f08ce (diff)
parent78eedc2c60ff4718200f9271d8ee4f437da3a0c5 (diff)
* New upstream release:
- Unbreak sshd_config's AuthorizedKeysFile option for $HOME-relative paths. - Include a language tag when sending a protocol 2 disconnection message. - Make logging of certificates used for user authentication more clear and consistent between CAs specified using TrustedUserCAKeys and authorized_keys.
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/servconf.c b/servconf.c
index 62417def7..d42dd527b 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.c,v 1.204 2010/03/04 10:36:03 djm Exp $ */ 1/* $OpenBSD: servconf.c,v 1.207 2010/03/25 23:38:28 djm 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
@@ -500,15 +500,14 @@ parse_token(const char *cp, const char *filename,
500char * 500char *
501derelativise_path(const char *path) 501derelativise_path(const char *path)
502{ 502{
503 char *expanded, *ret, *cwd; 503 char *expanded, *ret, cwd[MAXPATHLEN];
504 504
505 expanded = tilde_expand_filename(path, getuid()); 505 expanded = tilde_expand_filename(path, getuid());
506 if (*expanded == '/') 506 if (*expanded == '/')
507 return expanded; 507 return expanded;
508 if ((cwd = getcwd(NULL, 0)) == NULL) 508 if (getcwd(cwd, sizeof(cwd)) == NULL)
509 fatal("%s: getcwd: %s", __func__, strerror(errno)); 509 fatal("%s: getcwd: %s", __func__, strerror(errno));
510 xasprintf(&ret, "%s/%s", cwd, expanded); 510 xasprintf(&ret, "%s/%s", cwd, expanded);
511 xfree(cwd);
512 xfree(expanded); 511 xfree(expanded);
513 return ret; 512 return ret;
514} 513}
@@ -1269,7 +1268,17 @@ process_server_config_line(ServerOptions *options, char *line,
1269 charptr = (opcode == sAuthorizedKeysFile) ? 1268 charptr = (opcode == sAuthorizedKeysFile) ?
1270 &options->authorized_keys_file : 1269 &options->authorized_keys_file :
1271 &options->authorized_keys_file2; 1270 &options->authorized_keys_file2;
1272 goto parse_filename; 1271 arg = strdelim(&cp);
1272 if (!arg || *arg == '\0')
1273 fatal("%s line %d: missing file name.",
1274 filename, linenum);
1275 if (*activep && *charptr == NULL) {
1276 *charptr = tilde_expand_filename(arg, getuid());
1277 /* increase optional counter */
1278 if (intptr != NULL)
1279 *intptr = *intptr + 1;
1280 }
1281 break;
1273 1282
1274 case sClientAliveInterval: 1283 case sClientAliveInterval:
1275 intptr = &options->client_alive_interval; 1284 intptr = &options->client_alive_interval;