View | Details | Raw Unified | Return to bug 2272 | Differences between
and this patch

Collapse All | Expand All

(-)a/servconf.c (-6 / +9 lines)
Lines 978-984 process_server_config_line(ServerOptions *options, char *line, Link Here
978
		if ((value = convtime(arg)) == -1)
978
		if ((value = convtime(arg)) == -1)
979
			fatal("%s line %d: invalid time value.",
979
			fatal("%s line %d: invalid time value.",
980
			    filename, linenum);
980
			    filename, linenum);
981
		if (*intptr == -1)
981
		if (*activep && *intptr == -1)
982
			*intptr = value;
982
			*intptr = value;
983
		break;
983
		break;
984
984
Lines 1559-1565 process_server_config_line(ServerOptions *options, char *line, Link Here
1559
		if (value == -1)
1559
		if (value == -1)
1560
			fatal("%s line %d: Bad yes/point-to-point/ethernet/"
1560
			fatal("%s line %d: Bad yes/point-to-point/ethernet/"
1561
			    "no argument: %s", filename, linenum, arg);
1561
			    "no argument: %s", filename, linenum, arg);
1562
		if (*intptr == -1)
1562
		if (*activep && *intptr == -1)
1563
			*intptr = value;
1563
			*intptr = value;
1564
		break;
1564
		break;
1565
1565
Lines 1698-1704 process_server_config_line(ServerOptions *options, char *line, Link Here
1698
		break;
1698
		break;
1699
1699
1700
	case sAuthenticationMethods:
1700
	case sAuthenticationMethods:
1701
		if (*activep && options->num_auth_methods == 0) {
1701
		if (options->num_auth_methods == 0) {
1702
			while ((arg = strdelim(&cp)) && *arg != '\0') {
1702
			while ((arg = strdelim(&cp)) && *arg != '\0') {
1703
				if (options->num_auth_methods >=
1703
				if (options->num_auth_methods >=
1704
				    MAX_AUTH_METHODS)
1704
				    MAX_AUTH_METHODS)
Lines 1709-1714 process_server_config_line(ServerOptions *options, char *line, Link Here
1709
					fatal("%s line %d: invalid "
1709
					fatal("%s line %d: invalid "
1710
					    "authentication method list.",
1710
					    "authentication method list.",
1711
					    filename, linenum);
1711
					    filename, linenum);
1712
				if (!*activep)
1713
					continue;
1712
				options->auth_methods[
1714
				options->auth_methods[
1713
				    options->num_auth_methods++] = xstrdup(arg);
1715
				    options->num_auth_methods++] = xstrdup(arg);
1714
			}
1716
			}
Lines 1718-1730 process_server_config_line(ServerOptions *options, char *line, Link Here
1718
	case sStreamLocalBindMask:
1720
	case sStreamLocalBindMask:
1719
		arg = strdelim(&cp);
1721
		arg = strdelim(&cp);
1720
		if (!arg || *arg == '\0')
1722
		if (!arg || *arg == '\0')
1721
			fatal("%s line %d: missing StreamLocalBindMask argument.",
1723
			fatal("%s line %d: missing StreamLocalBindMask "
1722
			    filename, linenum);
1724
			    "argument.", filename, linenum);
1723
		/* Parse mode in octal format */
1725
		/* Parse mode in octal format */
1724
		value = strtol(arg, &p, 8);
1726
		value = strtol(arg, &p, 8);
1725
		if (arg == p || value < 0 || value > 0777)
1727
		if (arg == p || value < 0 || value > 0777)
1726
			fatal("%s line %d: Bad mask.", filename, linenum);
1728
			fatal("%s line %d: Bad mask.", filename, linenum);
1727
		options->fwd_opts.streamlocal_bind_mask = (mode_t)value;
1729
		if (*activep)
1730
			options->fwd_opts.streamlocal_bind_mask = (mode_t)value;
1728
		break;
1731
		break;
1729
1732
1730
	case sStreamLocalBindUnlink:
1733
	case sStreamLocalBindUnlink:

Return to bug 2272