View | Details | Raw Unified | Return to bug 2664
Collapse All | Expand All

(-)servconf.c (-15 / +7 lines)
Lines 1021-1026 struct multistate { Link Here
1021
	char *key;
1021
	char *key;
1022
	int value;
1022
	int value;
1023
};
1023
};
1024
static const struct multistate multistate_flag[] = {
1025
	{ "yes",			1 },
1026
	{ "no",				0 },
1027
	{ NULL, -1 }
1028
};
1024
static const struct multistate multistate_addressfamily[] = {
1029
static const struct multistate multistate_addressfamily[] = {
1025
	{ "inet",			AF_INET },
1030
	{ "inet",			AF_INET },
1026
	{ "inet6",			AF_INET6 },
1031
	{ "inet6",			AF_INET6 },
Lines 1255-1275 process_server_config_line(ServerOptions Link Here
1255
	case sIgnoreRhosts:
1260
	case sIgnoreRhosts:
1256
		intptr = &options->ignore_rhosts;
1261
		intptr = &options->ignore_rhosts;
1257
 parse_flag:
1262
 parse_flag:
1258
		arg = strdelim(&cp);
1263
		multistate_ptr = multistate_flag;
1259
		if (!arg || *arg == '\0')
1264
		goto parse_multistate;
1260
			fatal("%s line %d: missing yes/no argument.",
1261
			    filename, linenum);
1262
		value = 0;	/* silence compiler */
1263
		if (strcmp(arg, "yes") == 0)
1264
			value = 1;
1265
		else if (strcmp(arg, "no") == 0)
1266
			value = 0;
1267
		else
1268
			fatal("%s line %d: Bad yes/no argument: %s",
1269
				filename, linenum, arg);
1270
		if (*activep && *intptr == -1)
1271
			*intptr = value;
1272
		break;
1273
1265
1274
	case sIgnoreUserKnownHosts:
1266
	case sIgnoreUserKnownHosts:
1275
		intptr = &options->ignore_user_known_hosts;
1267
		intptr = &options->ignore_user_known_hosts;

Return to bug 2664