=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/session.c,v retrieving revision 1.209 retrieving revision 1.210 diff -u -r1.209 -r1.210 --- src/usr.bin/ssh/session.c 2006/07/11 20:07:25 1.209 +++ src/usr.bin/ssh/session.c 2006/07/19 13:07:10 1.210 @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.209 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: session.c,v 1.210 2006/07/19 13:07:10 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -539,10 +539,14 @@ void do_exec(Session *s, const char *command) { - if (forced_command) { + if (options.adm_forced_command) { original_command = command; + command = options.adm_forced_command; + debug("Forced command (config) '%.900s'", command); + } else if (forced_command) { + original_command = command; command = forced_command; - debug("Forced command '%.900s'", command); + debug("Forced command (key option) '%.900s'", command); } #ifdef GSSAPI