|
Lines 882-887
parse_multistate_value(const char *arg, const char *filename, int linenum,
Link Here
|
| 882 |
return -1; |
882 |
return -1; |
| 883 |
} |
883 |
} |
| 884 |
|
884 |
|
|
|
885 |
static char * |
| 886 |
next_arg(int *argcp, char ***argvp) |
| 887 |
{ |
| 888 |
char *ret = (*argvp)[0]; |
| 889 |
|
| 890 |
if (*argcp > 0 && ret != NULL) { |
| 891 |
(*argcp)--; |
| 892 |
(*argvp)++; |
| 893 |
} |
| 894 |
return ret; |
| 895 |
} |
| 896 |
|
| 897 |
static void |
| 898 |
consume_args(int *argcp) |
| 899 |
{ |
| 900 |
*argcp = 0; |
| 901 |
} |
| 902 |
|
| 885 |
/* |
903 |
/* |
| 886 |
* Processes a single option line as used in the configuration files. This |
904 |
* Processes a single option line as used in the configuration files. This |
| 887 |
* only sets those values that have not already been set. |
905 |
* only sets those values that have not already been set. |
|
Lines 901-907
process_config_line_depth(Options *options, struct passwd *pw, const char *host,
Link Here
|
| 901 |
const char *original_host, char *line, const char *filename, |
919 |
const char *original_host, char *line, const char *filename, |
| 902 |
int linenum, int *activep, int flags, int *want_final_pass, int depth) |
920 |
int linenum, int *activep, int flags, int *want_final_pass, int depth) |
| 903 |
{ |
921 |
{ |
| 904 |
char *s, **charptr, *endofnumber, *keyword, *arg, *arg2, *p, ch; |
922 |
char *str, **charptr, *endofnumber, *keyword, *arg, *arg2, *p, ch; |
| 905 |
char **cpptr, ***cppptr, fwdarg[256]; |
923 |
char **cpptr, ***cppptr, fwdarg[256]; |
| 906 |
u_int i, *uintptr, uvalue, max_entries = 0; |
924 |
u_int i, *uintptr, uvalue, max_entries = 0; |
| 907 |
int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0; |
925 |
int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0; |
|
Lines 915-920
process_config_line_depth(Options *options, struct passwd *pw, const char *host,
Link Here
|
| 915 |
struct allowed_cname *cname; |
933 |
struct allowed_cname *cname; |
| 916 |
glob_t gl; |
934 |
glob_t gl; |
| 917 |
const char *errstr; |
935 |
const char *errstr; |
|
|
936 |
char **oav = NULL, **av; |
| 937 |
int oac = 0, ac; |
| 938 |
int ret = -1; |
| 918 |
|
939 |
|
| 919 |
if (activep == NULL) { /* We are processing a command line directive */ |
940 |
if (activep == NULL) { /* We are processing a command line directive */ |
| 920 |
cmdline = 1; |
941 |
cmdline = 1; |
|
Lines 930-975
process_config_line_depth(Options *options, struct passwd *pw, const char *host,
Link Here
|
| 930 |
line[len] = '\0'; |
951 |
line[len] = '\0'; |
| 931 |
} |
952 |
} |
| 932 |
|
953 |
|
| 933 |
s = line; |
954 |
str = line; |
| 934 |
/* Get the keyword. (Each line is supposed to begin with a keyword). */ |
955 |
/* Get the keyword. (Each line is supposed to begin with a keyword). */ |
| 935 |
if ((keyword = strdelim(&s)) == NULL) |
956 |
if ((keyword = strdelim(&str)) == NULL) |
| 936 |
return 0; |
957 |
return 0; |
| 937 |
/* Ignore leading whitespace. */ |
958 |
/* Ignore leading whitespace. */ |
| 938 |
if (*keyword == '\0') |
959 |
if (*keyword == '\0') |
| 939 |
keyword = strdelim(&s); |
960 |
keyword = strdelim(&str); |
| 940 |
if (keyword == NULL || !*keyword || *keyword == '\n' || *keyword == '#') |
961 |
if (keyword == NULL || !*keyword || *keyword == '\n' || *keyword == '#') |
| 941 |
return 0; |
962 |
return 0; |
| 942 |
/* Match lowercase keyword */ |
963 |
/* Match lowercase keyword */ |
| 943 |
lowercase(keyword); |
964 |
lowercase(keyword); |
| 944 |
|
965 |
|
|
|
966 |
/* Prepare to parse remainder of line */ |
| 967 |
if (str != NULL) |
| 968 |
str += strspn(str, WHITESPACE); |
| 969 |
if (str == NULL || *str == '\0') { |
| 970 |
error("%s line %d: no argument after keyword \"%s\"", |
| 971 |
filename, linenum, keyword); |
| 972 |
return -1; |
| 973 |
} |
| 945 |
opcode = parse_token(keyword, filename, linenum, |
974 |
opcode = parse_token(keyword, filename, linenum, |
| 946 |
options->ignored_unknown); |
975 |
options->ignored_unknown); |
|
|
976 |
if (argv_split(str, &oac, &oav, 1) != 0) { |
| 977 |
error("%s line %d: invalid quotes", filename, linenum); |
| 978 |
return -1; |
| 979 |
} |
| 980 |
ac = oac; |
| 981 |
av = oav; |
| 947 |
|
982 |
|
| 948 |
switch (opcode) { |
983 |
switch (opcode) { |
| 949 |
case oBadOption: |
984 |
case oBadOption: |
| 950 |
/* don't panic, but count bad options */ |
985 |
/* don't panic, but count bad options */ |
| 951 |
return -1; |
986 |
goto out; |
| 952 |
case oIgnore: |
987 |
case oIgnore: |
| 953 |
return 0; |
988 |
consume_args(&ac); |
|
|
989 |
break; |
| 954 |
case oIgnoredUnknownOption: |
990 |
case oIgnoredUnknownOption: |
| 955 |
debug("%s line %d: Ignored unknown option \"%s\"", |
991 |
debug("%s line %d: Ignored unknown option \"%s\"", |
| 956 |
filename, linenum, keyword); |
992 |
filename, linenum, keyword); |
| 957 |
return 0; |
993 |
consume_args(&ac); |
|
|
994 |
break; |
| 958 |
case oConnectTimeout: |
995 |
case oConnectTimeout: |
| 959 |
intptr = &options->connection_timeout; |
996 |
intptr = &options->connection_timeout; |
| 960 |
parse_time: |
997 |
parse_time: |
| 961 |
arg = strdelim(&s); |
998 |
arg = next_arg(&ac, &av); |
| 962 |
if (!arg || *arg == '\0') { |
999 |
if (!arg || *arg == '\0') { |
| 963 |
error("%s line %d: missing time value.", |
1000 |
error("%s line %d: missing time value.", |
| 964 |
filename, linenum); |
1001 |
filename, linenum); |
| 965 |
return -1; |
1002 |
goto out; |
| 966 |
} |
1003 |
} |
| 967 |
if (strcmp(arg, "none") == 0) |
1004 |
if (strcmp(arg, "none") == 0) |
| 968 |
value = -1; |
1005 |
value = -1; |
| 969 |
else if ((value = convtime(arg)) == -1) { |
1006 |
else if ((value = convtime(arg)) == -1) { |
| 970 |
error("%s line %d: invalid time value.", |
1007 |
error("%s line %d: invalid time value.", |
| 971 |
filename, linenum); |
1008 |
filename, linenum); |
| 972 |
return -1; |
1009 |
goto out; |
| 973 |
} |
1010 |
} |
| 974 |
if (*activep && *intptr == -1) |
1011 |
if (*activep && *intptr == -1) |
| 975 |
*intptr = value; |
1012 |
*intptr = value; |
|
Lines 978-988
parse_time:
Link Here
|
| 978 |
case oForwardAgent: |
1015 |
case oForwardAgent: |
| 979 |
intptr = &options->forward_agent; |
1016 |
intptr = &options->forward_agent; |
| 980 |
|
1017 |
|
| 981 |
arg = strdelim(&s); |
1018 |
arg = next_arg(&ac, &av); |
| 982 |
if (!arg || *arg == '\0') { |
1019 |
if (!arg || *arg == '\0') { |
| 983 |
error("%s line %d: missing argument.", |
1020 |
error("%s line %d: missing argument.", |
| 984 |
filename, linenum); |
1021 |
filename, linenum); |
| 985 |
return -1; |
1022 |
goto out; |
| 986 |
} |
1023 |
} |
| 987 |
|
1024 |
|
| 988 |
value = -1; |
1025 |
value = -1; |
|
Lines 1010-1021
parse_time:
Link Here
|
| 1010 |
parse_flag: |
1047 |
parse_flag: |
| 1011 |
multistate_ptr = multistate_flag; |
1048 |
multistate_ptr = multistate_flag; |
| 1012 |
parse_multistate: |
1049 |
parse_multistate: |
| 1013 |
arg = strdelim(&s); |
1050 |
arg = next_arg(&ac, &av); |
| 1014 |
if ((value = parse_multistate_value(arg, filename, linenum, |
1051 |
if ((value = parse_multistate_value(arg, filename, linenum, |
| 1015 |
multistate_ptr)) == -1) { |
1052 |
multistate_ptr)) == -1) { |
| 1016 |
error("%s line %d: unsupported option \"%s\".", |
1053 |
error("%s line %d: unsupported option \"%s\".", |
| 1017 |
filename, linenum, arg); |
1054 |
filename, linenum, arg); |
| 1018 |
return -1; |
1055 |
goto out; |
| 1019 |
} |
1056 |
} |
| 1020 |
if (*activep && *intptr == -1) |
1057 |
if (*activep && *intptr == -1) |
| 1021 |
*intptr = value; |
1058 |
*intptr = value; |
|
Lines 1105-1115
parse_time:
Link Here
|
| 1105 |
goto parse_int; |
1142 |
goto parse_int; |
| 1106 |
|
1143 |
|
| 1107 |
case oRekeyLimit: |
1144 |
case oRekeyLimit: |
| 1108 |
arg = strdelim(&s); |
1145 |
arg = next_arg(&ac, &av); |
| 1109 |
if (!arg || *arg == '\0') { |
1146 |
if (!arg || *arg == '\0') { |
| 1110 |
error("%.200s line %d: Missing argument.", filename, |
1147 |
error("%.200s line %d: Missing argument.", filename, |
| 1111 |
linenum); |
1148 |
linenum); |
| 1112 |
return -1; |
1149 |
goto out; |
| 1113 |
} |
1150 |
} |
| 1114 |
if (strcmp(arg, "default") == 0) { |
1151 |
if (strcmp(arg, "default") == 0) { |
| 1115 |
val64 = 0; |
1152 |
val64 = 0; |
|
Lines 1117-1135
parse_time:
Link Here
|
| 1117 |
if (scan_scaled(arg, &val64) == -1) { |
1154 |
if (scan_scaled(arg, &val64) == -1) { |
| 1118 |
error("%.200s line %d: Bad number '%s': %s", |
1155 |
error("%.200s line %d: Bad number '%s': %s", |
| 1119 |
filename, linenum, arg, strerror(errno)); |
1156 |
filename, linenum, arg, strerror(errno)); |
| 1120 |
return -1; |
1157 |
goto out; |
| 1121 |
} |
1158 |
} |
| 1122 |
if (val64 != 0 && val64 < 16) { |
1159 |
if (val64 != 0 && val64 < 16) { |
| 1123 |
error("%.200s line %d: RekeyLimit too small", |
1160 |
error("%.200s line %d: RekeyLimit too small", |
| 1124 |
filename, linenum); |
1161 |
filename, linenum); |
| 1125 |
return -1; |
1162 |
goto out; |
| 1126 |
} |
1163 |
} |
| 1127 |
} |
1164 |
} |
| 1128 |
if (*activep && options->rekey_limit == -1) |
1165 |
if (*activep && options->rekey_limit == -1) |
| 1129 |
options->rekey_limit = val64; |
1166 |
options->rekey_limit = val64; |
| 1130 |
if (s != NULL) { /* optional rekey interval present */ |
1167 |
if (ac != 0) { /* optional rekey interval present */ |
| 1131 |
if (strcmp(s, "none") == 0) { |
1168 |
if (strcmp(av[0], "none") == 0) { |
| 1132 |
(void)strdelim(&s); /* discard */ |
1169 |
(void)next_arg(&ac, &av); /* discard */ |
| 1133 |
break; |
1170 |
break; |
| 1134 |
} |
1171 |
} |
| 1135 |
intptr = &options->rekey_interval; |
1172 |
intptr = &options->rekey_interval; |
|
Lines 1138-1148
parse_time:
Link Here
|
| 1138 |
break; |
1175 |
break; |
| 1139 |
|
1176 |
|
| 1140 |
case oIdentityFile: |
1177 |
case oIdentityFile: |
| 1141 |
arg = strdelim(&s); |
1178 |
arg = next_arg(&ac, &av); |
| 1142 |
if (!arg || *arg == '\0') { |
1179 |
if (!arg || *arg == '\0') { |
| 1143 |
error("%.200s line %d: Missing argument.", |
1180 |
error("%.200s line %d: Missing argument.", |
| 1144 |
filename, linenum); |
1181 |
filename, linenum); |
| 1145 |
return -1; |
1182 |
goto out; |
| 1146 |
} |
1183 |
} |
| 1147 |
if (*activep) { |
1184 |
if (*activep) { |
| 1148 |
intptr = &options->num_identity_files; |
1185 |
intptr = &options->num_identity_files; |
|
Lines 1150-1156
parse_time:
Link Here
|
| 1150 |
error("%.200s line %d: Too many identity files " |
1187 |
error("%.200s line %d: Too many identity files " |
| 1151 |
"specified (max %d).", filename, linenum, |
1188 |
"specified (max %d).", filename, linenum, |
| 1152 |
SSH_MAX_IDENTITY_FILES); |
1189 |
SSH_MAX_IDENTITY_FILES); |
| 1153 |
return -1; |
1190 |
goto out; |
| 1154 |
} |
1191 |
} |
| 1155 |
add_identity_file(options, NULL, |
1192 |
add_identity_file(options, NULL, |
| 1156 |
arg, flags & SSHCONF_USERCONF); |
1193 |
arg, flags & SSHCONF_USERCONF); |
|
Lines 1158-1168
parse_time:
Link Here
|
| 1158 |
break; |
1195 |
break; |
| 1159 |
|
1196 |
|
| 1160 |
case oCertificateFile: |
1197 |
case oCertificateFile: |
| 1161 |
arg = strdelim(&s); |
1198 |
arg = next_arg(&ac, &av); |
| 1162 |
if (!arg || *arg == '\0') { |
1199 |
if (!arg || *arg == '\0') { |
| 1163 |
error("%.200s line %d: Missing argument.", |
1200 |
error("%.200s line %d: Missing argument.", |
| 1164 |
filename, linenum); |
1201 |
filename, linenum); |
| 1165 |
return -1; |
1202 |
goto out; |
| 1166 |
} |
1203 |
} |
| 1167 |
if (*activep) { |
1204 |
if (*activep) { |
| 1168 |
intptr = &options->num_certificate_files; |
1205 |
intptr = &options->num_certificate_files; |
|
Lines 1171-1177
parse_time:
Link Here
|
| 1171 |
"files specified (max %d).", |
1208 |
"files specified (max %d).", |
| 1172 |
filename, linenum, |
1209 |
filename, linenum, |
| 1173 |
SSH_MAX_CERTIFICATE_FILES); |
1210 |
SSH_MAX_CERTIFICATE_FILES); |
| 1174 |
return -1; |
1211 |
goto out; |
| 1175 |
} |
1212 |
} |
| 1176 |
add_certificate_file(options, arg, |
1213 |
add_certificate_file(options, arg, |
| 1177 |
flags & SSHCONF_USERCONF); |
1214 |
flags & SSHCONF_USERCONF); |
|
Lines 1185-1195
parse_time:
Link Here
|
| 1185 |
case oUser: |
1222 |
case oUser: |
| 1186 |
charptr = &options->user; |
1223 |
charptr = &options->user; |
| 1187 |
parse_string: |
1224 |
parse_string: |
| 1188 |
arg = strdelim(&s); |
1225 |
arg = next_arg(&ac, &av); |
| 1189 |
if (!arg || *arg == '\0') { |
1226 |
if (!arg || *arg == '\0') { |
| 1190 |
error("%.200s line %d: Missing argument.", |
1227 |
error("%.200s line %d: Missing argument.", |
| 1191 |
filename, linenum); |
1228 |
filename, linenum); |
| 1192 |
return -1; |
1229 |
goto out; |
| 1193 |
} |
1230 |
} |
| 1194 |
if (*activep && *charptr == NULL) |
1231 |
if (*activep && *charptr == NULL) |
| 1195 |
*charptr = xstrdup(arg); |
1232 |
*charptr = xstrdup(arg); |
|
Lines 1200-1216
parse_string:
Link Here
|
| 1200 |
uintptr = &options->num_system_hostfiles; |
1237 |
uintptr = &options->num_system_hostfiles; |
| 1201 |
max_entries = SSH_MAX_HOSTS_FILES; |
1238 |
max_entries = SSH_MAX_HOSTS_FILES; |
| 1202 |
parse_char_array: |
1239 |
parse_char_array: |
| 1203 |
if (*activep && *uintptr == 0) { |
1240 |
i = 0; |
| 1204 |
while ((arg = strdelim(&s)) != NULL && *arg != '\0') { |
1241 |
while ((arg = next_arg(&ac, &av)) != NULL) { |
|
|
1242 |
if (*arg == '\0') { |
| 1243 |
error("%s line %d: keyword %s empty argument", |
| 1244 |
filename, linenum, keyword); |
| 1245 |
goto out; |
| 1246 |
} |
| 1247 |
/* Allow "none" only in first position */ |
| 1248 |
if (strcasecmp(arg, "none") == 0) { |
| 1249 |
if (i > 0 || ac > 0) { |
| 1250 |
error("%s line %d: keyword %s \"none\" " |
| 1251 |
"argument must appear alone.", |
| 1252 |
filename, linenum, keyword); |
| 1253 |
goto out; |
| 1254 |
} |
| 1255 |
} |
| 1256 |
i++; |
| 1257 |
if (*activep && *uintptr == 0) { |
| 1205 |
if ((*uintptr) >= max_entries) { |
1258 |
if ((*uintptr) >= max_entries) { |
| 1206 |
error("%s line %d: too many known " |
1259 |
error("%s line %d: too many %s " |
| 1207 |
"hosts files.", filename, linenum); |
1260 |
"entries.", filename, linenum, |
| 1208 |
return -1; |
1261 |
keyword); |
|
|
1262 |
goto out; |
| 1209 |
} |
1263 |
} |
| 1210 |
cpptr[(*uintptr)++] = xstrdup(arg); |
1264 |
cpptr[(*uintptr)++] = xstrdup(arg); |
| 1211 |
} |
1265 |
} |
| 1212 |
} |
1266 |
} |
| 1213 |
return 0; |
1267 |
break; |
| 1214 |
|
1268 |
|
| 1215 |
case oUserKnownHostsFile: |
1269 |
case oUserKnownHostsFile: |
| 1216 |
cpptr = (char **)&options->user_hostfiles; |
1270 |
cpptr = (char **)&options->user_hostfiles; |
|
Lines 1256-1297
parse_char_array:
Link Here
|
| 1256 |
if (options->jump_host != NULL) |
1310 |
if (options->jump_host != NULL) |
| 1257 |
charptr = &options->jump_host; /* Skip below */ |
1311 |
charptr = &options->jump_host; /* Skip below */ |
| 1258 |
parse_command: |
1312 |
parse_command: |
| 1259 |
if (s == NULL) { |
1313 |
if (str == NULL) { |
| 1260 |
error("%.200s line %d: Missing argument.", |
1314 |
error("%.200s line %d: Missing argument.", |
| 1261 |
filename, linenum); |
1315 |
filename, linenum); |
| 1262 |
return -1; |
1316 |
goto out; |
| 1263 |
} |
1317 |
} |
| 1264 |
len = strspn(s, WHITESPACE "="); |
1318 |
len = strspn(str, WHITESPACE "="); |
| 1265 |
if (*activep && *charptr == NULL) |
1319 |
if (*activep && *charptr == NULL) |
| 1266 |
*charptr = xstrdup(s + len); |
1320 |
*charptr = xstrdup(str + len); |
| 1267 |
return 0; |
1321 |
consume_args(&ac); |
|
|
1322 |
break; |
| 1268 |
|
1323 |
|
| 1269 |
case oProxyJump: |
1324 |
case oProxyJump: |
| 1270 |
if (s == NULL) { |
1325 |
if (str == NULL) { |
| 1271 |
error("%.200s line %d: Missing argument.", |
1326 |
error("%.200s line %d: Missing argument.", |
| 1272 |
filename, linenum); |
1327 |
filename, linenum); |
| 1273 |
return -1; |
1328 |
goto out; |
| 1274 |
} |
1329 |
} |
| 1275 |
len = strspn(s, WHITESPACE "="); |
1330 |
len = strspn(str, WHITESPACE "="); |
| 1276 |
if (parse_jump(s + len, options, *activep) == -1) { |
1331 |
/* XXX use argv? */ |
|
|
1332 |
if (parse_jump(str + len, options, *activep) == -1) { |
| 1277 |
error("%.200s line %d: Invalid ProxyJump \"%s\"", |
1333 |
error("%.200s line %d: Invalid ProxyJump \"%s\"", |
| 1278 |
filename, linenum, s + len); |
1334 |
filename, linenum, str + len); |
| 1279 |
return -1; |
1335 |
goto out; |
| 1280 |
} |
1336 |
} |
| 1281 |
return 0; |
1337 |
consume_args(&ac); |
|
|
1338 |
break; |
| 1282 |
|
1339 |
|
| 1283 |
case oPort: |
1340 |
case oPort: |
| 1284 |
arg = strdelim(&s); |
1341 |
arg = next_arg(&ac, &av); |
| 1285 |
if (!arg || *arg == '\0') { |
1342 |
if (!arg || *arg == '\0') { |
| 1286 |
error("%.200s line %d: Missing argument.", |
1343 |
error("%.200s line %d: Missing argument.", |
| 1287 |
filename, linenum); |
1344 |
filename, linenum); |
| 1288 |
return -1; |
1345 |
goto out; |
| 1289 |
} |
1346 |
} |
| 1290 |
value = a2port(arg); |
1347 |
value = a2port(arg); |
| 1291 |
if (value <= 0) { |
1348 |
if (value <= 0) { |
| 1292 |
error("%.200s line %d: Bad port '%s'.", |
1349 |
error("%.200s line %d: Bad port '%s'.", |
| 1293 |
filename, linenum, arg); |
1350 |
filename, linenum, arg); |
| 1294 |
return -1; |
1351 |
goto out; |
| 1295 |
} |
1352 |
} |
| 1296 |
if (*activep && options->port == -1) |
1353 |
if (*activep && options->port == -1) |
| 1297 |
options->port = value; |
1354 |
options->port = value; |
|
Lines 1300-1362
parse_command:
Link Here
|
| 1300 |
case oConnectionAttempts: |
1357 |
case oConnectionAttempts: |
| 1301 |
intptr = &options->connection_attempts; |
1358 |
intptr = &options->connection_attempts; |
| 1302 |
parse_int: |
1359 |
parse_int: |
| 1303 |
arg = strdelim(&s); |
1360 |
arg = next_arg(&ac, &av); |
| 1304 |
if ((errstr = atoi_err(arg, &value)) != NULL) { |
1361 |
if ((errstr = atoi_err(arg, &value)) != NULL) { |
| 1305 |
error("%s line %d: integer value %s.", |
1362 |
error("%s line %d: integer value %s.", |
| 1306 |
filename, linenum, errstr); |
1363 |
filename, linenum, errstr); |
| 1307 |
return -1; |
1364 |
goto out; |
| 1308 |
} |
1365 |
} |
| 1309 |
if (*activep && *intptr == -1) |
1366 |
if (*activep && *intptr == -1) |
| 1310 |
*intptr = value; |
1367 |
*intptr = value; |
| 1311 |
break; |
1368 |
break; |
| 1312 |
|
1369 |
|
| 1313 |
case oCiphers: |
1370 |
case oCiphers: |
| 1314 |
arg = strdelim(&s); |
1371 |
arg = next_arg(&ac, &av); |
| 1315 |
if (!arg || *arg == '\0') { |
1372 |
if (!arg || *arg == '\0') { |
| 1316 |
error("%.200s line %d: Missing argument.", |
1373 |
error("%.200s line %d: Missing argument.", |
| 1317 |
filename, linenum); |
1374 |
filename, linenum); |
| 1318 |
return -1; |
1375 |
goto out; |
| 1319 |
} |
1376 |
} |
| 1320 |
if (*arg != '-' && |
1377 |
if (*arg != '-' && |
| 1321 |
!ciphers_valid(*arg == '+' || *arg == '^' ? arg + 1 : arg)){ |
1378 |
!ciphers_valid(*arg == '+' || *arg == '^' ? arg + 1 : arg)){ |
| 1322 |
error("%.200s line %d: Bad SSH2 cipher spec '%s'.", |
1379 |
error("%.200s line %d: Bad SSH2 cipher spec '%s'.", |
| 1323 |
filename, linenum, arg ? arg : "<NONE>"); |
1380 |
filename, linenum, arg ? arg : "<NONE>"); |
| 1324 |
return -1; |
1381 |
goto out; |
| 1325 |
} |
1382 |
} |
| 1326 |
if (*activep && options->ciphers == NULL) |
1383 |
if (*activep && options->ciphers == NULL) |
| 1327 |
options->ciphers = xstrdup(arg); |
1384 |
options->ciphers = xstrdup(arg); |
| 1328 |
break; |
1385 |
break; |
| 1329 |
|
1386 |
|
| 1330 |
case oMacs: |
1387 |
case oMacs: |
| 1331 |
arg = strdelim(&s); |
1388 |
arg = next_arg(&ac, &av); |
| 1332 |
if (!arg || *arg == '\0') { |
1389 |
if (!arg || *arg == '\0') { |
| 1333 |
error("%.200s line %d: Missing argument.", |
1390 |
error("%.200s line %d: Missing argument.", |
| 1334 |
filename, linenum); |
1391 |
filename, linenum); |
| 1335 |
return -1; |
1392 |
goto out; |
| 1336 |
} |
1393 |
} |
| 1337 |
if (*arg != '-' && |
1394 |
if (*arg != '-' && |
| 1338 |
!mac_valid(*arg == '+' || *arg == '^' ? arg + 1 : arg)) { |
1395 |
!mac_valid(*arg == '+' || *arg == '^' ? arg + 1 : arg)) { |
| 1339 |
error("%.200s line %d: Bad SSH2 MAC spec '%s'.", |
1396 |
error("%.200s line %d: Bad SSH2 MAC spec '%s'.", |
| 1340 |
filename, linenum, arg ? arg : "<NONE>"); |
1397 |
filename, linenum, arg ? arg : "<NONE>"); |
| 1341 |
return -1; |
1398 |
goto out; |
| 1342 |
} |
1399 |
} |
| 1343 |
if (*activep && options->macs == NULL) |
1400 |
if (*activep && options->macs == NULL) |
| 1344 |
options->macs = xstrdup(arg); |
1401 |
options->macs = xstrdup(arg); |
| 1345 |
break; |
1402 |
break; |
| 1346 |
|
1403 |
|
| 1347 |
case oKexAlgorithms: |
1404 |
case oKexAlgorithms: |
| 1348 |
arg = strdelim(&s); |
1405 |
arg = next_arg(&ac, &av); |
| 1349 |
if (!arg || *arg == '\0') { |
1406 |
if (!arg || *arg == '\0') { |
| 1350 |
error("%.200s line %d: Missing argument.", |
1407 |
error("%.200s line %d: Missing argument.", |
| 1351 |
filename, linenum); |
1408 |
filename, linenum); |
| 1352 |
return -1; |
1409 |
goto out; |
| 1353 |
} |
1410 |
} |
| 1354 |
if (*arg != '-' && |
1411 |
if (*arg != '-' && |
| 1355 |
!kex_names_valid(*arg == '+' || *arg == '^' ? |
1412 |
!kex_names_valid(*arg == '+' || *arg == '^' ? |
| 1356 |
arg + 1 : arg)) { |
1413 |
arg + 1 : arg)) { |
| 1357 |
error("%.200s line %d: Bad SSH2 KexAlgorithms '%s'.", |
1414 |
error("%.200s line %d: Bad SSH2 KexAlgorithms '%s'.", |
| 1358 |
filename, linenum, arg ? arg : "<NONE>"); |
1415 |
filename, linenum, arg ? arg : "<NONE>"); |
| 1359 |
return -1; |
1416 |
goto out; |
| 1360 |
} |
1417 |
} |
| 1361 |
if (*activep && options->kex_algorithms == NULL) |
1418 |
if (*activep && options->kex_algorithms == NULL) |
| 1362 |
options->kex_algorithms = xstrdup(arg); |
1419 |
options->kex_algorithms = xstrdup(arg); |
|
Lines 1365-1382
parse_int:
Link Here
|
| 1365 |
case oHostKeyAlgorithms: |
1422 |
case oHostKeyAlgorithms: |
| 1366 |
charptr = &options->hostkeyalgorithms; |
1423 |
charptr = &options->hostkeyalgorithms; |
| 1367 |
parse_pubkey_algos: |
1424 |
parse_pubkey_algos: |
| 1368 |
arg = strdelim(&s); |
1425 |
arg = next_arg(&ac, &av); |
| 1369 |
if (!arg || *arg == '\0') { |
1426 |
if (!arg || *arg == '\0') { |
| 1370 |
error("%.200s line %d: Missing argument.", |
1427 |
error("%.200s line %d: Missing argument.", |
| 1371 |
filename, linenum); |
1428 |
filename, linenum); |
| 1372 |
return -1; |
1429 |
goto out; |
| 1373 |
} |
1430 |
} |
| 1374 |
if (*arg != '-' && |
1431 |
if (*arg != '-' && |
| 1375 |
!sshkey_names_valid2(*arg == '+' || *arg == '^' ? |
1432 |
!sshkey_names_valid2(*arg == '+' || *arg == '^' ? |
| 1376 |
arg + 1 : arg, 1)) { |
1433 |
arg + 1 : arg, 1)) { |
| 1377 |
error("%s line %d: Bad key types '%s'.", |
1434 |
error("%s line %d: Bad key types '%s'.", |
| 1378 |
filename, linenum, arg ? arg : "<NONE>"); |
1435 |
filename, linenum, arg ? arg : "<NONE>"); |
| 1379 |
return -1; |
1436 |
goto out; |
| 1380 |
} |
1437 |
} |
| 1381 |
if (*activep && *charptr == NULL) |
1438 |
if (*activep && *charptr == NULL) |
| 1382 |
*charptr = xstrdup(arg); |
1439 |
*charptr = xstrdup(arg); |
|
Lines 1388-1399
parse_pubkey_algos:
Link Here
|
| 1388 |
|
1445 |
|
| 1389 |
case oLogLevel: |
1446 |
case oLogLevel: |
| 1390 |
log_level_ptr = &options->log_level; |
1447 |
log_level_ptr = &options->log_level; |
| 1391 |
arg = strdelim(&s); |
1448 |
arg = next_arg(&ac, &av); |
| 1392 |
value = log_level_number(arg); |
1449 |
value = log_level_number(arg); |
| 1393 |
if (value == SYSLOG_LEVEL_NOT_SET) { |
1450 |
if (value == SYSLOG_LEVEL_NOT_SET) { |
| 1394 |
error("%.200s line %d: unsupported log level '%s'", |
1451 |
error("%.200s line %d: unsupported log level '%s'", |
| 1395 |
filename, linenum, arg ? arg : "<NONE>"); |
1452 |
filename, linenum, arg ? arg : "<NONE>"); |
| 1396 |
return -1; |
1453 |
goto out; |
| 1397 |
} |
1454 |
} |
| 1398 |
if (*activep && *log_level_ptr == SYSLOG_LEVEL_NOT_SET) |
1455 |
if (*activep && *log_level_ptr == SYSLOG_LEVEL_NOT_SET) |
| 1399 |
*log_level_ptr = (LogLevel) value; |
1456 |
*log_level_ptr = (LogLevel) value; |
|
Lines 1401-1412
parse_pubkey_algos:
Link Here
|
| 1401 |
|
1458 |
|
| 1402 |
case oLogFacility: |
1459 |
case oLogFacility: |
| 1403 |
log_facility_ptr = &options->log_facility; |
1460 |
log_facility_ptr = &options->log_facility; |
| 1404 |
arg = strdelim(&s); |
1461 |
arg = next_arg(&ac, &av); |
| 1405 |
value = log_facility_number(arg); |
1462 |
value = log_facility_number(arg); |
| 1406 |
if (value == SYSLOG_FACILITY_NOT_SET) { |
1463 |
if (value == SYSLOG_FACILITY_NOT_SET) { |
| 1407 |
error("%.200s line %d: unsupported log facility '%s'", |
1464 |
error("%.200s line %d: unsupported log facility '%s'", |
| 1408 |
filename, linenum, arg ? arg : "<NONE>"); |
1465 |
filename, linenum, arg ? arg : "<NONE>"); |
| 1409 |
return -1; |
1466 |
goto out; |
| 1410 |
} |
1467 |
} |
| 1411 |
if (*log_facility_ptr == -1) |
1468 |
if (*log_facility_ptr == -1) |
| 1412 |
*log_facility_ptr = (SyslogFacility) value; |
1469 |
*log_facility_ptr = (SyslogFacility) value; |
|
Lines 1415-1451
parse_pubkey_algos:
Link Here
|
| 1415 |
case oLogVerbose: |
1472 |
case oLogVerbose: |
| 1416 |
cppptr = &options->log_verbose; |
1473 |
cppptr = &options->log_verbose; |
| 1417 |
uintptr = &options->num_log_verbose; |
1474 |
uintptr = &options->num_log_verbose; |
| 1418 |
if (*activep && *uintptr == 0) { |
1475 |
i = 0; |
| 1419 |
while ((arg = strdelim(&s)) != NULL && *arg != '\0') { |
1476 |
while ((arg = next_arg(&ac, &av)) != NULL) { |
|
|
1477 |
if (*arg == '\0') { |
| 1478 |
error("%s line %d: keyword %s empty argument", |
| 1479 |
filename, linenum, keyword); |
| 1480 |
goto out; |
| 1481 |
} |
| 1482 |
/* Allow "none" only in first position */ |
| 1483 |
if (strcasecmp(arg, "none") == 0) { |
| 1484 |
if (i > 0 || ac > 0) { |
| 1485 |
error("%s line %d: keyword %s \"none\" " |
| 1486 |
"argument must appear alone.", |
| 1487 |
filename, linenum, keyword); |
| 1488 |
goto out; |
| 1489 |
} |
| 1490 |
} |
| 1491 |
i++; |
| 1492 |
if (*activep && *uintptr == 0) { |
| 1420 |
*cppptr = xrecallocarray(*cppptr, *uintptr, |
1493 |
*cppptr = xrecallocarray(*cppptr, *uintptr, |
| 1421 |
*uintptr + 1, sizeof(**cppptr)); |
1494 |
*uintptr + 1, sizeof(**cppptr)); |
| 1422 |
(*cppptr)[(*uintptr)++] = xstrdup(arg); |
1495 |
(*cppptr)[(*uintptr)++] = xstrdup(arg); |
| 1423 |
} |
1496 |
} |
| 1424 |
} |
1497 |
} |
| 1425 |
return 0; |
1498 |
break; |
| 1426 |
|
1499 |
|
| 1427 |
case oLocalForward: |
1500 |
case oLocalForward: |
| 1428 |
case oRemoteForward: |
1501 |
case oRemoteForward: |
| 1429 |
case oDynamicForward: |
1502 |
case oDynamicForward: |
| 1430 |
arg = strdelim(&s); |
1503 |
arg = next_arg(&ac, &av); |
| 1431 |
if (!arg || *arg == '\0') { |
1504 |
if (!arg || *arg == '\0') { |
| 1432 |
error("%.200s line %d: Missing argument.", |
1505 |
error("%.200s line %d: Missing argument.", |
| 1433 |
filename, linenum); |
1506 |
filename, linenum); |
| 1434 |
return -1; |
1507 |
goto out; |
| 1435 |
} |
1508 |
} |
| 1436 |
|
1509 |
|
| 1437 |
remotefwd = (opcode == oRemoteForward); |
1510 |
remotefwd = (opcode == oRemoteForward); |
| 1438 |
dynamicfwd = (opcode == oDynamicForward); |
1511 |
dynamicfwd = (opcode == oDynamicForward); |
| 1439 |
|
1512 |
|
| 1440 |
if (!dynamicfwd) { |
1513 |
if (!dynamicfwd) { |
| 1441 |
arg2 = strdelim(&s); |
1514 |
arg2 = next_arg(&ac, &av); |
| 1442 |
if (arg2 == NULL || *arg2 == '\0') { |
1515 |
if (arg2 == NULL || *arg2 == '\0') { |
| 1443 |
if (remotefwd) |
1516 |
if (remotefwd) |
| 1444 |
dynamicfwd = 1; |
1517 |
dynamicfwd = 1; |
| 1445 |
else { |
1518 |
else { |
| 1446 |
error("%.200s line %d: Missing target " |
1519 |
error("%.200s line %d: Missing target " |
| 1447 |
"argument.", filename, linenum); |
1520 |
"argument.", filename, linenum); |
| 1448 |
return -1; |
1521 |
goto out; |
| 1449 |
} |
1522 |
} |
| 1450 |
} else { |
1523 |
} else { |
| 1451 |
/* construct a string for parse_forward */ |
1524 |
/* construct a string for parse_forward */ |
|
Lines 1459-1465
parse_pubkey_algos:
Link Here
|
| 1459 |
if (parse_forward(&fwd, fwdarg, dynamicfwd, remotefwd) == 0) { |
1532 |
if (parse_forward(&fwd, fwdarg, dynamicfwd, remotefwd) == 0) { |
| 1460 |
error("%.200s line %d: Bad forwarding specification.", |
1533 |
error("%.200s line %d: Bad forwarding specification.", |
| 1461 |
filename, linenum); |
1534 |
filename, linenum); |
| 1462 |
return -1; |
1535 |
goto out; |
| 1463 |
} |
1536 |
} |
| 1464 |
|
1537 |
|
| 1465 |
if (*activep) { |
1538 |
if (*activep) { |
|
Lines 1474-1480
parse_pubkey_algos:
Link Here
|
| 1474 |
case oPermitRemoteOpen: |
1547 |
case oPermitRemoteOpen: |
| 1475 |
uintptr = &options->num_permitted_remote_opens; |
1548 |
uintptr = &options->num_permitted_remote_opens; |
| 1476 |
cppptr = &options->permitted_remote_opens; |
1549 |
cppptr = &options->permitted_remote_opens; |
| 1477 |
arg = strdelim(&s); |
1550 |
arg = next_arg(&ac, &av); |
| 1478 |
if (!arg || *arg == '\0') |
1551 |
if (!arg || *arg == '\0') |
| 1479 |
fatal("%s line %d: missing %s specification", |
1552 |
fatal("%s line %d: missing %s specification", |
| 1480 |
filename, linenum, lookup_opcode_name(opcode)); |
1553 |
filename, linenum, lookup_opcode_name(opcode)); |
|
Lines 1487-1493
parse_pubkey_algos:
Link Here
|
| 1487 |
} |
1560 |
} |
| 1488 |
break; |
1561 |
break; |
| 1489 |
} |
1562 |
} |
| 1490 |
for (; arg != NULL && *arg != '\0'; arg = strdelim(&s)) { |
1563 |
while ((arg = next_arg(&ac, &av)) != NULL) { |
| 1491 |
arg2 = xstrdup(arg); |
1564 |
arg2 = xstrdup(arg); |
| 1492 |
ch = '\0'; |
1565 |
ch = '\0'; |
| 1493 |
p = hpdelim2(&arg, &ch); |
1566 |
p = hpdelim2(&arg, &ch); |
|
Lines 1524-1534
parse_pubkey_algos:
Link Here
|
| 1524 |
if (cmdline) { |
1597 |
if (cmdline) { |
| 1525 |
error("Host directive not supported as a command-line " |
1598 |
error("Host directive not supported as a command-line " |
| 1526 |
"option"); |
1599 |
"option"); |
| 1527 |
return -1; |
1600 |
goto out; |
| 1528 |
} |
1601 |
} |
| 1529 |
*activep = 0; |
1602 |
*activep = 0; |
| 1530 |
arg2 = NULL; |
1603 |
arg2 = NULL; |
| 1531 |
while ((arg = strdelim(&s)) != NULL && *arg != '\0') { |
1604 |
while ((arg = next_arg(&ac, &av)) != NULL) { |
|
|
1605 |
if (*arg == '\0') { |
| 1606 |
error("%s line %d: keyword %s empty argument", |
| 1607 |
filename, linenum, keyword); |
| 1608 |
goto out; |
| 1609 |
} |
| 1532 |
if ((flags & SSHCONF_NEVERMATCH) != 0) |
1610 |
if ((flags & SSHCONF_NEVERMATCH) != 0) |
| 1533 |
break; |
1611 |
break; |
| 1534 |
negated = *arg == '!'; |
1612 |
negated = *arg == '!'; |
|
Lines 1551-1583
parse_pubkey_algos:
Link Here
|
| 1551 |
if (*activep) |
1629 |
if (*activep) |
| 1552 |
debug("%.200s line %d: Applying options for %.100s", |
1630 |
debug("%.200s line %d: Applying options for %.100s", |
| 1553 |
filename, linenum, arg2); |
1631 |
filename, linenum, arg2); |
| 1554 |
/* Avoid garbage check below, as strdelim is done. */ |
1632 |
break; |
| 1555 |
return 0; |
|
|
| 1556 |
|
1633 |
|
| 1557 |
case oMatch: |
1634 |
case oMatch: |
| 1558 |
if (cmdline) { |
1635 |
if (cmdline) { |
| 1559 |
error("Host directive not supported as a command-line " |
1636 |
error("Host directive not supported as a command-line " |
| 1560 |
"option"); |
1637 |
"option"); |
| 1561 |
return -1; |
1638 |
goto out; |
| 1562 |
} |
1639 |
} |
| 1563 |
value = match_cfg_line(options, &s, pw, host, original_host, |
1640 |
value = match_cfg_line(options, &str, pw, host, original_host, |
| 1564 |
flags & SSHCONF_FINAL, want_final_pass, |
1641 |
flags & SSHCONF_FINAL, want_final_pass, |
| 1565 |
filename, linenum); |
1642 |
filename, linenum); |
| 1566 |
if (value < 0) { |
1643 |
if (value < 0) { |
| 1567 |
error("%.200s line %d: Bad Match condition", filename, |
1644 |
error("%.200s line %d: Bad Match condition", filename, |
| 1568 |
linenum); |
1645 |
linenum); |
| 1569 |
return -1; |
1646 |
goto out; |
| 1570 |
} |
1647 |
} |
| 1571 |
*activep = (flags & SSHCONF_NEVERMATCH) ? 0 : value; |
1648 |
*activep = (flags & SSHCONF_NEVERMATCH) ? 0 : value; |
|
|
1649 |
consume_args(&ac); |
| 1572 |
break; |
1650 |
break; |
| 1573 |
|
1651 |
|
| 1574 |
case oEscapeChar: |
1652 |
case oEscapeChar: |
| 1575 |
intptr = &options->escape_char; |
1653 |
intptr = &options->escape_char; |
| 1576 |
arg = strdelim(&s); |
1654 |
arg = next_arg(&ac, &av); |
| 1577 |
if (!arg || *arg == '\0') { |
1655 |
if (!arg || *arg == '\0') { |
| 1578 |
error("%.200s line %d: Missing argument.", |
1656 |
error("%.200s line %d: Missing argument.", |
| 1579 |
filename, linenum); |
1657 |
filename, linenum); |
| 1580 |
return -1; |
1658 |
goto out; |
| 1581 |
} |
1659 |
} |
| 1582 |
if (strcmp(arg, "none") == 0) |
1660 |
if (strcmp(arg, "none") == 0) |
| 1583 |
value = SSH_ESCAPECHAR_NONE; |
1661 |
value = SSH_ESCAPECHAR_NONE; |
|
Lines 1589-1595
parse_pubkey_algos:
Link Here
|
| 1589 |
else { |
1667 |
else { |
| 1590 |
error("%.200s line %d: Bad escape character.", |
1668 |
error("%.200s line %d: Bad escape character.", |
| 1591 |
filename, linenum); |
1669 |
filename, linenum); |
| 1592 |
return -1; |
1670 |
goto out; |
| 1593 |
} |
1671 |
} |
| 1594 |
if (*activep && *intptr == -1) |
1672 |
if (*activep && *intptr == -1) |
| 1595 |
*intptr = value; |
1673 |
*intptr = value; |
|
Lines 1617-1627
parse_pubkey_algos:
Link Here
|
| 1617 |
goto parse_int; |
1695 |
goto parse_int; |
| 1618 |
|
1696 |
|
| 1619 |
case oSendEnv: |
1697 |
case oSendEnv: |
| 1620 |
while ((arg = strdelim(&s)) != NULL && *arg != '\0') { |
1698 |
while ((arg = next_arg(&ac, &av)) != NULL) { |
| 1621 |
if (strchr(arg, '=') != NULL) { |
1699 |
if (*arg == '\0' || strchr(arg, '=') != NULL) { |
| 1622 |
error("%s line %d: Invalid environment name.", |
1700 |
error("%s line %d: Invalid environment name.", |
| 1623 |
filename, linenum); |
1701 |
filename, linenum); |
| 1624 |
return -1; |
1702 |
goto out; |
| 1625 |
} |
1703 |
} |
| 1626 |
if (!*activep) |
1704 |
if (!*activep) |
| 1627 |
continue; |
1705 |
continue; |
|
Lines 1634-1640
parse_pubkey_algos:
Link Here
|
| 1634 |
if (options->num_send_env >= INT_MAX) { |
1712 |
if (options->num_send_env >= INT_MAX) { |
| 1635 |
error("%s line %d: too many send env.", |
1713 |
error("%s line %d: too many send env.", |
| 1636 |
filename, linenum); |
1714 |
filename, linenum); |
| 1637 |
return -1; |
1715 |
goto out; |
| 1638 |
} |
1716 |
} |
| 1639 |
options->send_env = xrecallocarray( |
1717 |
options->send_env = xrecallocarray( |
| 1640 |
options->send_env, options->num_send_env, |
1718 |
options->send_env, options->num_send_env, |
|
Lines 1648-1658
parse_pubkey_algos:
Link Here
|
| 1648 |
|
1726 |
|
| 1649 |
case oSetEnv: |
1727 |
case oSetEnv: |
| 1650 |
value = options->num_setenv; |
1728 |
value = options->num_setenv; |
| 1651 |
while ((arg = strdelimw(&s)) != NULL && *arg != '\0') { |
1729 |
while ((arg = next_arg(&ac, &av)) != NULL) { |
| 1652 |
if (strchr(arg, '=') == NULL) { |
1730 |
if (strchr(arg, '=') == NULL) { |
| 1653 |
error("%s line %d: Invalid SetEnv.", |
1731 |
error("%s line %d: Invalid SetEnv.", |
| 1654 |
filename, linenum); |
1732 |
filename, linenum); |
| 1655 |
return -1; |
1733 |
goto out; |
| 1656 |
} |
1734 |
} |
| 1657 |
if (!*activep || value != 0) |
1735 |
if (!*activep || value != 0) |
| 1658 |
continue; |
1736 |
continue; |
|
Lines 1660-1666
parse_pubkey_algos:
Link Here
|
| 1660 |
if (options->num_setenv >= INT_MAX) { |
1738 |
if (options->num_setenv >= INT_MAX) { |
| 1661 |
error("%s line %d: too many SetEnv.", |
1739 |
error("%s line %d: too many SetEnv.", |
| 1662 |
filename, linenum); |
1740 |
filename, linenum); |
| 1663 |
return -1; |
1741 |
goto out; |
| 1664 |
} |
1742 |
} |
| 1665 |
options->setenv = xrecallocarray( |
1743 |
options->setenv = xrecallocarray( |
| 1666 |
options->setenv, options->num_setenv, |
1744 |
options->setenv, options->num_setenv, |
|
Lines 1681-1691
parse_pubkey_algos:
Link Here
|
| 1681 |
case oControlPersist: |
1759 |
case oControlPersist: |
| 1682 |
/* no/false/yes/true, or a time spec */ |
1760 |
/* no/false/yes/true, or a time spec */ |
| 1683 |
intptr = &options->control_persist; |
1761 |
intptr = &options->control_persist; |
| 1684 |
arg = strdelim(&s); |
1762 |
arg = next_arg(&ac, &av); |
| 1685 |
if (!arg || *arg == '\0') { |
1763 |
if (!arg || *arg == '\0') { |
| 1686 |
error("%.200s line %d: Missing ControlPersist" |
1764 |
error("%.200s line %d: Missing ControlPersist" |
| 1687 |
" argument.", filename, linenum); |
1765 |
" argument.", filename, linenum); |
| 1688 |
return -1; |
1766 |
goto out; |
| 1689 |
} |
1767 |
} |
| 1690 |
value = 0; |
1768 |
value = 0; |
| 1691 |
value2 = 0; /* timeout */ |
1769 |
value2 = 0; /* timeout */ |
|
Lines 1698-1704
parse_pubkey_algos:
Link Here
|
| 1698 |
else { |
1776 |
else { |
| 1699 |
error("%.200s line %d: Bad ControlPersist argument.", |
1777 |
error("%.200s line %d: Bad ControlPersist argument.", |
| 1700 |
filename, linenum); |
1778 |
filename, linenum); |
| 1701 |
return -1; |
1779 |
goto out; |
| 1702 |
} |
1780 |
} |
| 1703 |
if (*activep && *intptr == -1) { |
1781 |
if (*activep && *intptr == -1) { |
| 1704 |
*intptr = value; |
1782 |
*intptr = value; |
|
Lines 1716-1732
parse_pubkey_algos:
Link Here
|
| 1716 |
goto parse_multistate; |
1794 |
goto parse_multistate; |
| 1717 |
|
1795 |
|
| 1718 |
case oTunnelDevice: |
1796 |
case oTunnelDevice: |
| 1719 |
arg = strdelim(&s); |
1797 |
arg = next_arg(&ac, &av); |
| 1720 |
if (!arg || *arg == '\0') { |
1798 |
if (!arg || *arg == '\0') { |
| 1721 |
error("%.200s line %d: Missing argument.", |
1799 |
error("%.200s line %d: Missing argument.", |
| 1722 |
filename, linenum); |
1800 |
filename, linenum); |
| 1723 |
return -1; |
1801 |
goto out; |
| 1724 |
} |
1802 |
} |
| 1725 |
value = a2tun(arg, &value2); |
1803 |
value = a2tun(arg, &value2); |
| 1726 |
if (value == SSH_TUNID_ERR) { |
1804 |
if (value == SSH_TUNID_ERR) { |
| 1727 |
error("%.200s line %d: Bad tun device.", |
1805 |
error("%.200s line %d: Bad tun device.", |
| 1728 |
filename, linenum); |
1806 |
filename, linenum); |
| 1729 |
return -1; |
1807 |
goto out; |
| 1730 |
} |
1808 |
} |
| 1731 |
if (*activep) { |
1809 |
if (*activep) { |
| 1732 |
options->tun_local = value; |
1810 |
options->tun_local = value; |
|
Lines 1754-1763
parse_pubkey_algos:
Link Here
|
| 1754 |
if (cmdline) { |
1832 |
if (cmdline) { |
| 1755 |
error("Include directive not supported as a " |
1833 |
error("Include directive not supported as a " |
| 1756 |
"command-line option"); |
1834 |
"command-line option"); |
| 1757 |
return -1; |
1835 |
goto out; |
| 1758 |
} |
1836 |
} |
| 1759 |
value = 0; |
1837 |
value = 0; |
| 1760 |
while ((arg = strdelim(&s)) != NULL && *arg != '\0') { |
1838 |
while ((arg = next_arg(&ac, &av)) != NULL) { |
|
|
1839 |
if (*arg == '\0') { |
| 1840 |
error("%s line %d: keyword %s empty argument", |
| 1841 |
filename, linenum, keyword); |
| 1842 |
goto out; |
| 1843 |
} |
| 1761 |
/* |
1844 |
/* |
| 1762 |
* Ensure all paths are anchored. User configuration |
1845 |
* Ensure all paths are anchored. User configuration |
| 1763 |
* files may begin with '~/' but system configurations |
1846 |
* files may begin with '~/' but system configurations |
|
Lines 1768-1774
parse_pubkey_algos:
Link Here
|
| 1768 |
if (*arg == '~' && (flags & SSHCONF_USERCONF) == 0) { |
1851 |
if (*arg == '~' && (flags & SSHCONF_USERCONF) == 0) { |
| 1769 |
error("%.200s line %d: bad include path %s.", |
1852 |
error("%.200s line %d: bad include path %s.", |
| 1770 |
filename, linenum, arg); |
1853 |
filename, linenum, arg); |
| 1771 |
return -1; |
1854 |
goto out; |
| 1772 |
} |
1855 |
} |
| 1773 |
if (!path_absolute(arg) && *arg != '~') { |
1856 |
if (!path_absolute(arg) && *arg != '~') { |
| 1774 |
xasprintf(&arg2, "%s/%s", |
1857 |
xasprintf(&arg2, "%s/%s", |
|
Lines 1786-1792
parse_pubkey_algos:
Link Here
|
| 1786 |
} else if (r != 0) { |
1869 |
} else if (r != 0) { |
| 1787 |
error("%.200s line %d: glob failed for %s.", |
1870 |
error("%.200s line %d: glob failed for %s.", |
| 1788 |
filename, linenum, arg2); |
1871 |
filename, linenum, arg2); |
| 1789 |
return -1; |
1872 |
goto out; |
| 1790 |
} |
1873 |
} |
| 1791 |
free(arg2); |
1874 |
free(arg2); |
| 1792 |
oactive = *activep; |
1875 |
oactive = *activep; |
|
Lines 1805-1811
parse_pubkey_algos:
Link Here
|
| 1805 |
"%.100s: %.100s", gl.gl_pathv[i], |
1888 |
"%.100s: %.100s", gl.gl_pathv[i], |
| 1806 |
strerror(errno)); |
1889 |
strerror(errno)); |
| 1807 |
globfree(&gl); |
1890 |
globfree(&gl); |
| 1808 |
return -1; |
1891 |
goto out; |
| 1809 |
} |
1892 |
} |
| 1810 |
/* |
1893 |
/* |
| 1811 |
* don't let Match in includes clobber the |
1894 |
* don't let Match in includes clobber the |
|
Lines 1818-1840
parse_pubkey_algos:
Link Here
|
| 1818 |
globfree(&gl); |
1901 |
globfree(&gl); |
| 1819 |
} |
1902 |
} |
| 1820 |
if (value != 0) |
1903 |
if (value != 0) |
| 1821 |
return value; |
1904 |
ret = value; |
| 1822 |
break; |
1905 |
break; |
| 1823 |
|
1906 |
|
| 1824 |
case oIPQoS: |
1907 |
case oIPQoS: |
| 1825 |
arg = strdelim(&s); |
1908 |
arg = next_arg(&ac, &av); |
| 1826 |
if ((value = parse_ipqos(arg)) == -1) { |
1909 |
if ((value = parse_ipqos(arg)) == -1) { |
| 1827 |
error("%s line %d: Bad IPQoS value: %s", |
1910 |
error("%s line %d: Bad IPQoS value: %s", |
| 1828 |
filename, linenum, arg); |
1911 |
filename, linenum, arg); |
| 1829 |
return -1; |
1912 |
goto out; |
| 1830 |
} |
1913 |
} |
| 1831 |
arg = strdelim(&s); |
1914 |
arg = next_arg(&ac, &av); |
| 1832 |
if (arg == NULL) |
1915 |
if (arg == NULL) |
| 1833 |
value2 = value; |
1916 |
value2 = value; |
| 1834 |
else if ((value2 = parse_ipqos(arg)) == -1) { |
1917 |
else if ((value2 = parse_ipqos(arg)) == -1) { |
| 1835 |
error("%s line %d: Bad IPQoS value: %s", |
1918 |
error("%s line %d: Bad IPQoS value: %s", |
| 1836 |
filename, linenum, arg); |
1919 |
filename, linenum, arg); |
| 1837 |
return -1; |
1920 |
goto out; |
| 1838 |
} |
1921 |
} |
| 1839 |
if (*activep) { |
1922 |
if (*activep) { |
| 1840 |
options->ip_qos_interactive = value; |
1923 |
options->ip_qos_interactive = value; |
|
Lines 1857-1867
parse_pubkey_algos:
Link Here
|
| 1857 |
|
1940 |
|
| 1858 |
case oCanonicalDomains: |
1941 |
case oCanonicalDomains: |
| 1859 |
value = options->num_canonical_domains != 0; |
1942 |
value = options->num_canonical_domains != 0; |
| 1860 |
while ((arg = strdelim(&s)) != NULL && *arg != '\0') { |
1943 |
i = 0; |
|
|
1944 |
while ((arg = next_arg(&ac, &av)) != NULL) { |
| 1945 |
if (*arg == '\0') { |
| 1946 |
error("%s line %d: keyword %s empty argument", |
| 1947 |
filename, linenum, keyword); |
| 1948 |
goto out; |
| 1949 |
} |
| 1950 |
/* Allow "none" only in first position */ |
| 1951 |
if (strcasecmp(arg, "none") == 0) { |
| 1952 |
if (i > 0 || ac > 0) { |
| 1953 |
error("%s line %d: keyword %s \"none\" " |
| 1954 |
"argument must appear alone.", |
| 1955 |
filename, linenum, keyword); |
| 1956 |
goto out; |
| 1957 |
} |
| 1958 |
} |
| 1959 |
i++; |
| 1861 |
if (!valid_domain(arg, 1, &errstr)) { |
1960 |
if (!valid_domain(arg, 1, &errstr)) { |
| 1862 |
error("%s line %d: %s", filename, linenum, |
1961 |
error("%s line %d: %s", filename, linenum, |
| 1863 |
errstr); |
1962 |
errstr); |
| 1864 |
return -1; |
1963 |
goto out; |
| 1865 |
} |
1964 |
} |
| 1866 |
if (!*activep || value) |
1965 |
if (!*activep || value) |
| 1867 |
continue; |
1966 |
continue; |
|
Lines 1869-1875
parse_pubkey_algos:
Link Here
|
| 1869 |
MAX_CANON_DOMAINS) { |
1968 |
MAX_CANON_DOMAINS) { |
| 1870 |
error("%s line %d: too many hostname suffixes.", |
1969 |
error("%s line %d: too many hostname suffixes.", |
| 1871 |
filename, linenum); |
1970 |
filename, linenum); |
| 1872 |
return -1; |
1971 |
goto out; |
| 1873 |
} |
1972 |
} |
| 1874 |
options->canonical_domains[ |
1973 |
options->canonical_domains[ |
| 1875 |
options->num_canonical_domains++] = xstrdup(arg); |
1974 |
options->num_canonical_domains++] = xstrdup(arg); |
|
Lines 1878-1884
parse_pubkey_algos:
Link Here
|
| 1878 |
|
1977 |
|
| 1879 |
case oCanonicalizePermittedCNAMEs: |
1978 |
case oCanonicalizePermittedCNAMEs: |
| 1880 |
value = options->num_permitted_cnames != 0; |
1979 |
value = options->num_permitted_cnames != 0; |
| 1881 |
while ((arg = strdelim(&s)) != NULL && *arg != '\0') { |
1980 |
while ((arg = next_arg(&ac, &av)) != NULL) { |
| 1882 |
/* Either '*' for everything or 'list:list' */ |
1981 |
/* Either '*' for everything or 'list:list' */ |
| 1883 |
if (strcmp(arg, "*") == 0) |
1982 |
if (strcmp(arg, "*") == 0) |
| 1884 |
arg2 = arg; |
1983 |
arg2 = arg; |
|
Lines 1889-1895
parse_pubkey_algos:
Link Here
|
| 1889 |
error("%s line %d: " |
1988 |
error("%s line %d: " |
| 1890 |
"Invalid permitted CNAME \"%s\"", |
1989 |
"Invalid permitted CNAME \"%s\"", |
| 1891 |
filename, linenum, arg); |
1990 |
filename, linenum, arg); |
| 1892 |
return -1; |
1991 |
goto out; |
| 1893 |
} |
1992 |
} |
| 1894 |
*arg2 = '\0'; |
1993 |
*arg2 = '\0'; |
| 1895 |
arg2++; |
1994 |
arg2++; |
|
Lines 1900-1906
parse_pubkey_algos:
Link Here
|
| 1900 |
MAX_CANON_DOMAINS) { |
1999 |
MAX_CANON_DOMAINS) { |
| 1901 |
error("%s line %d: too many permitted CNAMEs.", |
2000 |
error("%s line %d: too many permitted CNAMEs.", |
| 1902 |
filename, linenum); |
2001 |
filename, linenum); |
| 1903 |
return -1; |
2002 |
goto out; |
| 1904 |
} |
2003 |
} |
| 1905 |
cname = options->permitted_cnames + |
2004 |
cname = options->permitted_cnames + |
| 1906 |
options->num_permitted_cnames++; |
2005 |
options->num_permitted_cnames++; |
|
Lines 1923-1939
parse_pubkey_algos:
Link Here
|
| 1923 |
goto parse_flag; |
2022 |
goto parse_flag; |
| 1924 |
|
2023 |
|
| 1925 |
case oStreamLocalBindMask: |
2024 |
case oStreamLocalBindMask: |
| 1926 |
arg = strdelim(&s); |
2025 |
arg = next_arg(&ac, &av); |
| 1927 |
if (!arg || *arg == '\0') { |
2026 |
if (!arg || *arg == '\0') { |
| 1928 |
error("%.200s line %d: Missing StreamLocalBindMask " |
2027 |
error("%.200s line %d: Missing StreamLocalBindMask " |
| 1929 |
"argument.", filename, linenum); |
2028 |
"argument.", filename, linenum); |
| 1930 |
return -1; |
2029 |
goto out; |
| 1931 |
} |
2030 |
} |
| 1932 |
/* Parse mode in octal format */ |
2031 |
/* Parse mode in octal format */ |
| 1933 |
value = strtol(arg, &endofnumber, 8); |
2032 |
value = strtol(arg, &endofnumber, 8); |
| 1934 |
if (arg == endofnumber || value < 0 || value > 0777) { |
2033 |
if (arg == endofnumber || value < 0 || value > 0777) { |
| 1935 |
error("%.200s line %d: Bad mask.", filename, linenum); |
2034 |
error("%.200s line %d: Bad mask.", filename, linenum); |
| 1936 |
return -1; |
2035 |
goto out; |
| 1937 |
} |
2036 |
} |
| 1938 |
options->fwd_opts.streamlocal_bind_mask = (mode_t)value; |
2037 |
options->fwd_opts.streamlocal_bind_mask = (mode_t)value; |
| 1939 |
break; |
2038 |
break; |
|
Lines 1948-1963
parse_pubkey_algos:
Link Here
|
| 1948 |
|
2047 |
|
| 1949 |
case oFingerprintHash: |
2048 |
case oFingerprintHash: |
| 1950 |
intptr = &options->fingerprint_hash; |
2049 |
intptr = &options->fingerprint_hash; |
| 1951 |
arg = strdelim(&s); |
2050 |
arg = next_arg(&ac, &av); |
| 1952 |
if (!arg || *arg == '\0') { |
2051 |
if (!arg || *arg == '\0') { |
| 1953 |
error("%.200s line %d: Missing argument.", |
2052 |
error("%.200s line %d: Missing argument.", |
| 1954 |
filename, linenum); |
2053 |
filename, linenum); |
| 1955 |
return -1; |
2054 |
goto out; |
| 1956 |
} |
2055 |
} |
| 1957 |
if ((value = ssh_digest_alg_by_name(arg)) == -1) { |
2056 |
if ((value = ssh_digest_alg_by_name(arg)) == -1) { |
| 1958 |
error("%.200s line %d: Invalid hash algorithm \"%s\".", |
2057 |
error("%.200s line %d: Invalid hash algorithm \"%s\".", |
| 1959 |
filename, linenum, arg); |
2058 |
filename, linenum, arg); |
| 1960 |
return -1; |
2059 |
goto out; |
| 1961 |
} |
2060 |
} |
| 1962 |
if (*activep && *intptr == -1) |
2061 |
if (*activep && *intptr == -1) |
| 1963 |
*intptr = value; |
2062 |
*intptr = value; |
|
Lines 1977-1984
parse_pubkey_algos:
Link Here
|
| 1977 |
goto parse_pubkey_algos; |
2076 |
goto parse_pubkey_algos; |
| 1978 |
|
2077 |
|
| 1979 |
case oAddKeysToAgent: |
2078 |
case oAddKeysToAgent: |
| 1980 |
arg = strdelim(&s); |
2079 |
arg = next_arg(&ac, &av); |
| 1981 |
arg2 = strdelim(&s); |
2080 |
arg2 = next_arg(&ac, &av); |
| 1982 |
value = parse_multistate_value(arg, filename, linenum, |
2081 |
value = parse_multistate_value(arg, filename, linenum, |
| 1983 |
multistate_yesnoaskconfirm); |
2082 |
multistate_yesnoaskconfirm); |
| 1984 |
value2 = 0; /* unlimited lifespan by default */ |
2083 |
value2 = 0; /* unlimited lifespan by default */ |
|
Lines 1988-2007
parse_pubkey_algos:
Link Here
|
| 1988 |
value2 > INT_MAX) { |
2087 |
value2 > INT_MAX) { |
| 1989 |
error("%s line %d: invalid time value.", |
2088 |
error("%s line %d: invalid time value.", |
| 1990 |
filename, linenum); |
2089 |
filename, linenum); |
| 1991 |
return -1; |
2090 |
goto out; |
| 1992 |
} |
2091 |
} |
| 1993 |
} else if (value == -1 && arg2 == NULL) { |
2092 |
} else if (value == -1 && arg2 == NULL) { |
| 1994 |
if ((value2 = convtime(arg)) == -1 || |
2093 |
if ((value2 = convtime(arg)) == -1 || |
| 1995 |
value2 > INT_MAX) { |
2094 |
value2 > INT_MAX) { |
| 1996 |
error("%s line %d: unsupported option", |
2095 |
error("%s line %d: unsupported option", |
| 1997 |
filename, linenum); |
2096 |
filename, linenum); |
| 1998 |
return -1; |
2097 |
goto out; |
| 1999 |
} |
2098 |
} |
| 2000 |
value = 1; /* yes */ |
2099 |
value = 1; /* yes */ |
| 2001 |
} else if (value == -1 || arg2 != NULL) { |
2100 |
} else if (value == -1 || arg2 != NULL) { |
| 2002 |
error("%s line %d: unsupported option", |
2101 |
error("%s line %d: unsupported option", |
| 2003 |
filename, linenum); |
2102 |
filename, linenum); |
| 2004 |
return -1; |
2103 |
goto out; |
| 2005 |
} |
2104 |
} |
| 2006 |
if (*activep && options->add_keys_to_agent == -1) { |
2105 |
if (*activep && options->add_keys_to_agent == -1) { |
| 2007 |
options->add_keys_to_agent = value; |
2106 |
options->add_keys_to_agent = value; |
|
Lines 2011-2028
parse_pubkey_algos:
Link Here
|
| 2011 |
|
2110 |
|
| 2012 |
case oIdentityAgent: |
2111 |
case oIdentityAgent: |
| 2013 |
charptr = &options->identity_agent; |
2112 |
charptr = &options->identity_agent; |
| 2014 |
arg = strdelim(&s); |
2113 |
arg = next_arg(&ac, &av); |
| 2015 |
if (!arg || *arg == '\0') { |
2114 |
if (!arg || *arg == '\0') { |
| 2016 |
error("%.200s line %d: Missing argument.", |
2115 |
error("%.200s line %d: Missing argument.", |
| 2017 |
filename, linenum); |
2116 |
filename, linenum); |
| 2018 |
return -1; |
2117 |
goto out; |
| 2019 |
} |
2118 |
} |
| 2020 |
parse_agent_path: |
2119 |
parse_agent_path: |
| 2021 |
/* Extra validation if the string represents an env var. */ |
2120 |
/* Extra validation if the string represents an env var. */ |
| 2022 |
if ((arg2 = dollar_expand(&r, arg)) == NULL || r) { |
2121 |
if ((arg2 = dollar_expand(&r, arg)) == NULL || r) { |
| 2023 |
error("%.200s line %d: Invalid environment expansion " |
2122 |
error("%.200s line %d: Invalid environment expansion " |
| 2024 |
"%s.", filename, linenum, arg); |
2123 |
"%s.", filename, linenum, arg); |
| 2025 |
return -1; |
2124 |
goto out; |
| 2026 |
} |
2125 |
} |
| 2027 |
free(arg2); |
2126 |
free(arg2); |
| 2028 |
/* check for legacy environment format */ |
2127 |
/* check for legacy environment format */ |
|
Lines 2030-2036
parse_pubkey_algos:
Link Here
|
| 2030 |
!valid_env_name(arg + 1)) { |
2129 |
!valid_env_name(arg + 1)) { |
| 2031 |
error("%.200s line %d: Invalid environment name %s.", |
2130 |
error("%.200s line %d: Invalid environment name %s.", |
| 2032 |
filename, linenum, arg); |
2131 |
filename, linenum, arg); |
| 2033 |
return -1; |
2132 |
goto out; |
| 2034 |
} |
2133 |
} |
| 2035 |
if (*activep && *charptr == NULL) |
2134 |
if (*activep && *charptr == NULL) |
| 2036 |
*charptr = xstrdup(arg); |
2135 |
*charptr = xstrdup(arg); |
|
Lines 2039-2063
parse_pubkey_algos:
Link Here
|
| 2039 |
case oDeprecated: |
2138 |
case oDeprecated: |
| 2040 |
debug("%s line %d: Deprecated option \"%s\"", |
2139 |
debug("%s line %d: Deprecated option \"%s\"", |
| 2041 |
filename, linenum, keyword); |
2140 |
filename, linenum, keyword); |
| 2042 |
return 0; |
2141 |
consume_args(&ac); |
|
|
2142 |
break; |
| 2043 |
|
2143 |
|
| 2044 |
case oUnsupported: |
2144 |
case oUnsupported: |
| 2045 |
error("%s line %d: Unsupported option \"%s\"", |
2145 |
error("%s line %d: Unsupported option \"%s\"", |
| 2046 |
filename, linenum, keyword); |
2146 |
filename, linenum, keyword); |
| 2047 |
return 0; |
2147 |
consume_args(&ac); |
|
|
2148 |
break; |
| 2048 |
|
2149 |
|
| 2049 |
default: |
2150 |
default: |
| 2050 |
error("%s line %d: Unimplemented opcode %d", |
2151 |
error("%s line %d: Unimplemented opcode %d", |
| 2051 |
filename, linenum, opcode); |
2152 |
filename, linenum, opcode); |
|
|
2153 |
goto out; |
| 2052 |
} |
2154 |
} |
| 2053 |
|
2155 |
|
| 2054 |
/* Check that there is no garbage at end of line. */ |
2156 |
/* Check that there is no garbage at end of line. */ |
| 2055 |
if ((arg = strdelim(&s)) != NULL && *arg != '\0') { |
2157 |
if (ac > 0) { |
| 2056 |
error("%.200s line %d: garbage at end of line; \"%.200s\".", |
2158 |
error("%.200s line %d: keyword %s extra arguments " |
| 2057 |
filename, linenum, arg); |
2159 |
"at end of line", filename, linenum, keyword); |
| 2058 |
return -1; |
2160 |
goto out; |
| 2059 |
} |
2161 |
} |
| 2060 |
return 0; |
2162 |
|
|
|
2163 |
/* success */ |
| 2164 |
ret = 0; |
| 2165 |
out: |
| 2166 |
for (ac = 0; ac < oac; ac++) |
| 2167 |
free(oav[ac]); |
| 2168 |
free(oav); |
| 2169 |
return ret; |
| 2061 |
} |
2170 |
} |
| 2062 |
|
2171 |
|
| 2063 |
/* |
2172 |
/* |
|
Lines 2083-2089
read_config_file_depth(const char *filename, struct passwd *pw,
Link Here
|
| 2083 |
int flags, int *activep, int *want_final_pass, int depth) |
2192 |
int flags, int *activep, int *want_final_pass, int depth) |
| 2084 |
{ |
2193 |
{ |
| 2085 |
FILE *f; |
2194 |
FILE *f; |
| 2086 |
char *cp, *line = NULL; |
2195 |
char *line = NULL; |
| 2087 |
size_t linesize = 0; |
2196 |
size_t linesize = 0; |
| 2088 |
int linenum; |
2197 |
int linenum; |
| 2089 |
int bad_options = 0; |
2198 |
int bad_options = 0; |
|
Lines 2119-2126
read_config_file_depth(const char *filename, struct passwd *pw,
Link Here
|
| 2119 |
* NB - preserve newlines, they are needed to reproduce |
2228 |
* NB - preserve newlines, they are needed to reproduce |
| 2120 |
* line numbers later for error messages. |
2229 |
* line numbers later for error messages. |
| 2121 |
*/ |
2230 |
*/ |
| 2122 |
if ((cp = strchr(line, '#')) != NULL) |
|
|
| 2123 |
*cp = '\0'; |
| 2124 |
if (process_config_line_depth(options, pw, host, original_host, |
2231 |
if (process_config_line_depth(options, pw, host, original_host, |
| 2125 |
line, filename, linenum, activep, flags, want_final_pass, |
2232 |
line, filename, linenum, activep, flags, want_final_pass, |
| 2126 |
depth) != 0) |
2233 |
depth) != 0) |
|
Lines 2998-3003
dump_cfg_strarray_oneline(OpCodes code, u_int count, char **vals)
Link Here
|
| 2998 |
u_int i; |
3105 |
u_int i; |
| 2999 |
|
3106 |
|
| 3000 |
printf("%s", lookup_opcode_name(code)); |
3107 |
printf("%s", lookup_opcode_name(code)); |
|
|
3108 |
if (count == 0) |
| 3109 |
printf(" none"); |
| 3001 |
for (i = 0; i < count; i++) |
3110 |
for (i = 0; i < count; i++) |
| 3002 |
printf(" %s", vals[i]); |
3111 |
printf(" %s", vals[i]); |
| 3003 |
printf("\n"); |
3112 |
printf("\n"); |