diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2010-09-30 11:04:52 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2010-09-30 11:04:52 +0000 |
commit | 2f86274719242750592c6c1b67137245da02edc3 (patch) | |
tree | f9f7b85436b04821fd5b864332dd213dc0ec45d5 /usr.bin | |
parent | d1cc87af7fe9a3e98fd2406856777478dadd7619 (diff) |
prevent free() of string in .rodata when overriding AuthorizedKeys in
a Match block; patch from rein AT basefarm.no
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/servconf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 3a6f8eae9b1..1c77e938d01 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.211 2010/09/22 05:01:29 djm Exp $ */ +/* $OpenBSD: servconf.c,v 1.212 2010/09/30 11:04:51 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * All rights reserved @@ -247,12 +247,12 @@ fill_default_server_options(ServerOptions *options) if (options->authorized_keys_file2 == NULL) { /* authorized_keys_file2 falls back to authorized_keys_file */ if (options->authorized_keys_file != NULL) - options->authorized_keys_file2 = options->authorized_keys_file; + options->authorized_keys_file2 = xstrdup(options->authorized_keys_file); else - options->authorized_keys_file2 = _PATH_SSH_USER_PERMITTED_KEYS2; + options->authorized_keys_file2 = xstrdup(_PATH_SSH_USER_PERMITTED_KEYS2); } if (options->authorized_keys_file == NULL) - options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS; + options->authorized_keys_file = xstrdup(_PATH_SSH_USER_PERMITTED_KEYS); if (options->permit_tun == -1) options->permit_tun = SSH_TUNMODE_NO; if (options->zero_knowledge_password_authentication == -1) |