summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-07-24 14:06:47 +1000
committerDamien Miller <djm@mindrot.org>2006-07-24 14:06:47 +1000
commite275443f66aab6d46356d6940b8a8b291cab4f9e (patch)
treecd72ec0001cf412475f5348aa83c830252d0e1ce /session.c
parentd1de9950e5ae91584aa955a4f85c9c7579aa76af (diff)
- dtucker@cvs.openbsd.org 2006/07/19 13:07:10
[servconf.c servconf.h session.c sshd.8 sshd_config sshd_config.5] Add ForceCommand keyword to sshd_config, equivalent to the "command=" key option, man page entry and example in sshd_config. Feedback & ok djm@, man page corrections & ok jmc@
Diffstat (limited to 'session.c')
-rw-r--r--session.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/session.c b/session.c
index 5441a4762..e189acdf2 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.c,v 1.209 2006/07/11 20:07:25 stevesk Exp $ */ 1/* $OpenBSD: session.c,v 1.210 2006/07/19 13:07:10 dtucker 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
@@ -672,10 +672,14 @@ do_pre_login(Session *s)
672void 672void
673do_exec(Session *s, const char *command) 673do_exec(Session *s, const char *command)
674{ 674{
675 if (forced_command) { 675 if (options.adm_forced_command) {
676 original_command = command;
677 command = options.adm_forced_command;
678 debug("Forced command (config) '%.900s'", command);
679 } else if (forced_command) {
676 original_command = command; 680 original_command = command;
677 command = forced_command; 681 command = forced_command;
678 debug("Forced command '%.900s'", command); 682 debug("Forced command (key option) '%.900s'", command);
679 } 683 }
680 684
681#ifdef SSH_AUDIT_EVENTS 685#ifdef SSH_AUDIT_EVENTS