summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--readconf.c8
-rw-r--r--ssh_config.510
3 files changed, 15 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index eac2a97ae..ac04cf214 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,12 @@
3 - djm@cvs.openbsd.org 2013/10/20 04:39:28 3 - djm@cvs.openbsd.org 2013/10/20 04:39:28
4 [ssh_config.5] 4 [ssh_config.5]
5 document % expansions performed by "Match command ..." 5 document % expansions performed by "Match command ..."
6 - djm@cvs.openbsd.org 2013/10/20 06:19:28
7 [readconf.c ssh_config.5]
8 rename "command" subclause of the recently-added "Match" keyword to
9 "exec"; it's shorter, clearer in intent and we might want to add the
10 ability to match against the command being executed at the remote end in
11 the future.
6 12
720131018 1320131018
8 - (djm) OpenBSD CVS Sync 14 - (djm) OpenBSD CVS Sync
diff --git a/readconf.c b/readconf.c
index fb77fa9dc..bd13d4176 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.209 2013/10/16 22:49:38 djm Exp $ */ 1/* $OpenBSD: readconf.c,v 1.210 2013/10/20 06:19:27 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -504,7 +504,7 @@ match_cfg_line(Options *options, char **condition, struct passwd *pw,
504 debug("%.200s line %d: matched " 504 debug("%.200s line %d: matched "
505 "'LocalUser %.100s' ", 505 "'LocalUser %.100s' ",
506 filename, linenum, pw->pw_name); 506 filename, linenum, pw->pw_name);
507 } else if (strcasecmp(attrib, "command") == 0) { 507 } else if (strcasecmp(attrib, "exec") == 0) {
508 if (gethostname(thishost, sizeof(thishost)) == -1) 508 if (gethostname(thishost, sizeof(thishost)) == -1)
509 fatal("gethostname: %s", strerror(errno)); 509 fatal("gethostname: %s", strerror(errno));
510 strlcpy(shorthost, thishost, sizeof(shorthost)); 510 strlcpy(shorthost, thishost, sizeof(shorthost));
@@ -523,11 +523,11 @@ match_cfg_line(Options *options, char **condition, struct passwd *pw,
523 (char *)NULL); 523 (char *)NULL);
524 r = execute_in_shell(cmd); 524 r = execute_in_shell(cmd);
525 if (r == -1) { 525 if (r == -1) {
526 fatal("%.200s line %d: match command '%.100s' " 526 fatal("%.200s line %d: match exec '%.100s' "
527 "error", filename, linenum, cmd); 527 "error", filename, linenum, cmd);
528 } else if (r == 0) { 528 } else if (r == 0) {
529 debug("%.200s line %d: matched " 529 debug("%.200s line %d: matched "
530 "'Command \"%.100s\"' ", 530 "'exec \"%.100s\"' ",
531 filename, linenum, cmd); 531 filename, linenum, cmd);
532 } else 532 } else
533 result = 0; 533 result = 0;
diff --git a/ssh_config.5 b/ssh_config.5
index 3e9524dcc..b60dc1a51 100644
--- a/ssh_config.5
+++ b/ssh_config.5
@@ -33,7 +33,7 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: ssh_config.5,v 1.175 2013/10/20 04:39:28 djm Exp $ 36.\" $OpenBSD: ssh_config.5,v 1.176 2013/10/20 06:19:28 djm Exp $
37.Dd $Mdocdate: October 20 2013 $ 37.Dd $Mdocdate: October 20 2013 $
38.Dt SSH_CONFIG 5 38.Dt SSH_CONFIG 5
39.Os 39.Os
@@ -136,7 +136,7 @@ keyword) to be used only when the conditions following the
136keyword are satisfied. 136keyword are satisfied.
137Match conditions are specified using one or more keyword/criteria pairs. 137Match conditions are specified using one or more keyword/criteria pairs.
138The available keywords are: 138The available keywords are:
139.Cm command , 139.Cm exec ,
140.Cm host , 140.Cm host ,
141.Cm originalhost , 141.Cm originalhost ,
142.Cm user , 142.Cm user ,
@@ -144,8 +144,8 @@ and
144.Cm localuser . 144.Cm localuser .
145.Pp 145.Pp
146The criteria for the 146The criteria for the
147.Cm command 147.Cm exec
148keyword is a path to a command that is executed. 148keyword is command that is executed under the user's shell..
149If the command returns a zero exit status then the condition is considered true. 149If the command returns a zero exit status then the condition is considered true.
150Commands containing whitespace characters must be quoted. 150Commands containing whitespace characters must be quoted.
151The following character sequences in the command will be expanded prior to 151The following character sequences in the command will be expanded prior to
@@ -158,7 +158,7 @@ will be substituted by the local host name (including any domain name),
158will be substituted by the target host name, 158will be substituted by the target host name,
159.Ql %n 159.Ql %n
160will be substituted by the original target host name 160will be substituted by the original target host name
161specified on the command line, 161specified on the command-line,
162.Ql %p 162.Ql %p
163the destination port, 163the destination port,
164.Ql %r 164.Ql %r