X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/0f8cd5a6407b464c57c396eec410a8df60cf9e94..dd984467dd49a0f1249a3e092eaf14cff27fe33a:/servconf.c diff --git a/servconf.c b/servconf.c index 1443e832..c5b933ab 100644 --- a/servconf.c +++ b/servconf.c @@ -1,3 +1,4 @@ +/* $OpenBSD: servconf.c,v 1.152 2006/07/08 21:47:12 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -11,6 +12,9 @@ #include "includes.h" +#include +#include + #include "ssh.h" #include "log.h" #include "servconf.h" @@ -445,6 +449,7 @@ process_server_config_line(ServerOptions *options, char *line, ServerOpCodes opcode; u_short port; u_int i; + size_t len; cp = line; if ((arg = strdelim(&cp)) == NULL) @@ -900,6 +905,17 @@ parse_flag: fatal("%s line %d: Missing subsystem command.", filename, linenum); options->subsystem_command[options->num_subsystems] = xstrdup(arg); + + /* Collect arguments (separate to executable) */ + p = xstrdup(arg); + len = strlen(p) + 1; + while ((arg = strdelim(&cp)) != NULL && *arg != '\0') { + len += 1 + strlen(arg); + p = xrealloc(p, 1, len); + strlcat(p, " ", len); + strlcat(p, arg, len); + } + options->subsystem_args[options->num_subsystems] = p; options->num_subsystems++; break;