summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-01-08 17:03:46 +1100
committerDarren Tucker <dtucker@zip.com.au>2010-01-08 17:03:46 +1100
commit34e314da1b832fee576e4ebd8b177154a45fec15 (patch)
tree0530be5f339034486b323ed96674f6291ab79d42 /readconf.c
parentf1de4e5228ad86b191c3297bf6c528753587be5e (diff)
- reyk@cvs.openbsd.org 2009/10/28 16:38:18
[ssh_config.5 sshd.c misc.h ssh-keyscan.1 readconf.h sshconnect.c channels.c channels.h servconf.h servconf.c ssh.1 ssh-keyscan.c scp.1 sftp.1 sshd_config.5 readconf.c ssh.c misc.c] Allow to set the rdomain in ssh/sftp/scp/sshd and ssh-keyscan. ok markus@
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/readconf.c b/readconf.c
index 4a16974b8..6b2e3b21d 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.178 2009/10/08 14:03:41 markus Exp $ */ 1/* $OpenBSD: readconf.c,v 1.179 2009/10/28 16:38:18 reyk 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
@@ -130,8 +130,8 @@ typedef enum {
130 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly, 130 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
131 oSendEnv, oControlPath, oControlMaster, oHashKnownHosts, 131 oSendEnv, oControlPath, oControlMaster, oHashKnownHosts,
132 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand, 132 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
133 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication, 133 oVisualHostKey, oUseRoaming, oRDomain,
134 oDeprecated, oUnsupported 134 oZeroKnowledgePasswordAuthentication, oDeprecated, oUnsupported
135} OpCodes; 135} OpCodes;
136 136
137/* Textual representations of the tokens. */ 137/* Textual representations of the tokens. */
@@ -229,6 +229,7 @@ static struct {
229 { "permitlocalcommand", oPermitLocalCommand }, 229 { "permitlocalcommand", oPermitLocalCommand },
230 { "visualhostkey", oVisualHostKey }, 230 { "visualhostkey", oVisualHostKey },
231 { "useroaming", oUseRoaming }, 231 { "useroaming", oUseRoaming },
232 { "rdomain", oRDomain },
232#ifdef JPAKE 233#ifdef JPAKE
233 { "zeroknowledgepasswordauthentication", 234 { "zeroknowledgepasswordauthentication",
234 oZeroKnowledgePasswordAuthentication }, 235 oZeroKnowledgePasswordAuthentication },
@@ -919,6 +920,19 @@ parse_int:
919 intptr = &options->use_roaming; 920 intptr = &options->use_roaming;
920 goto parse_flag; 921 goto parse_flag;
921 922
923 case oRDomain:
924 arg = strdelim(&s);
925 if (!arg || *arg == '\0')
926 fatal("%.200s line %d: Missing argument.",
927 filename, linenum);
928 value = a2port(arg);
929 if (value == -1)
930 fatal("%.200s line %d: Bad rdomain.",
931 filename, linenum);
932 if (*activep)
933 options->rdomain = value;
934 break;
935
922 case oDeprecated: 936 case oDeprecated:
923 debug("%s line %d: Deprecated option \"%s\"", 937 debug("%s line %d: Deprecated option \"%s\"",
924 filename, linenum, keyword); 938 filename, linenum, keyword);
@@ -1069,6 +1083,7 @@ initialize_options(Options * options)
1069 options->local_command = NULL; 1083 options->local_command = NULL;
1070 options->permit_local_command = -1; 1084 options->permit_local_command = -1;
1071 options->use_roaming = -1; 1085 options->use_roaming = -1;
1086 options->rdomain = -1;
1072 options->visual_host_key = -1; 1087 options->visual_host_key = -1;
1073 options->zero_knowledge_password_authentication = -1; 1088 options->zero_knowledge_password_authentication = -1;
1074} 1089}
@@ -1217,6 +1232,7 @@ fill_default_options(Options * options)
1217 /* options->hostname will be set in the main program if appropriate */ 1232 /* options->hostname will be set in the main program if appropriate */
1218 /* options->host_key_alias should not be set by default */ 1233 /* options->host_key_alias should not be set by default */
1219 /* options->preferred_authentications will be set in ssh */ 1234 /* options->preferred_authentications will be set in ssh */
1235 /* options->rdomain should not be set by default */
1220} 1236}
1221 1237
1222/* 1238/*