diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2017-10-25 00:19:48 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2017-10-25 00:19:48 +0000 |
commit | 6073e3054f7de5795bc6172c21f93e6f5c9e42db (patch) | |
tree | 07328932592a81a636ec0c8e5ed44a77179d5ffa /usr.bin/ssh/sshd.c | |
parent | 9e208c0cbdee8f2773b06a0477e34e3d64cf65f8 (diff) |
add a "rdomain" criteria for the sshd_config Match keyword to allow
conditional configuration that depends on which rdomain(4) a connection
was recevied on. ok markus@
Diffstat (limited to 'usr.bin/ssh/sshd.c')
-rw-r--r-- | usr.bin/ssh/sshd.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index b2793a77160..2a1f6956388 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.495 2017/10/25 00:17:08 djm Exp $ */ +/* $OpenBSD: sshd.c,v 1.496 2017/10/25 00:19:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1328,7 +1328,7 @@ main(int ac, char **av) extern int optind; int r, opt, on = 1, already_daemon, remote_port; int sock_in = -1, sock_out = -1, newsock = -1; - const char *remote_ip; + const char *remote_ip, *rdomain; char *fp, *line, *laddr, *logfile = NULL; int config_s[2] = { -1 , -1 }; u_int i, j; @@ -1866,10 +1866,14 @@ main(int ac, char **av) */ remote_ip = ssh_remote_ipaddr(ssh); + rdomain = ssh_packet_rdomain_in(ssh); + /* Log the connection. */ laddr = get_local_ipaddr(sock_in); - verbose("Connection from %s port %d on %s port %d", - remote_ip, remote_port, laddr, ssh_local_port(ssh)); + verbose("Connection from %s port %d on %s port %d%s%s", + remote_ip, remote_port, laddr, ssh_local_port(ssh), + rdomain == NULL ? "" : " rdomain ", + rdomain == NULL ? "" : rdomain); free(laddr); /* |