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

Collapse All | Expand All

(-)sshd.c (-5 / +5 lines)
Lines 1219-1225 server_accept_loop(int *sock_in, int *so Link Here
1219
	}
1219
	}
1220
}
1220
}
1221
1221
1222
1223
/*
1222
/*
1224
 * Main program for the daemon.
1223
 * Main program for the daemon.
1225
 */
1224
 */
Lines 1337-1343 main(int ac, char **av) Link Here
1337
			break;
1336
			break;
1338
		case 'h':
1337
		case 'h':
1339
			if (options.num_host_key_files >= MAX_HOSTKEYS) {
1338
			if (options.num_host_key_files >= MAX_HOSTKEYS) {
1340
				fprintf(stderr, "too many host keys.\n");
1339
				fprintf(stderr, "Too many host keys.\n");
1340
				exit(1);
1341
			}
1342
			if (*optarg != '/') {
1343
				fprintf(stderr, "Host key path is not absolute\n");
1341
				exit(1);
1344
				exit(1);
1342
			}
1345
			}
1343
			options.host_key_files[options.num_host_key_files++] = optarg;
1346
			options.host_key_files[options.num_host_key_files++] = optarg;
Lines 1452-1460 main(int ac, char **av) Link Here
1452
	/* load private host keys */
1455
	/* load private host keys */
1453
	sensitive_data.host_keys = xcalloc(options.num_host_key_files,
1456
	sensitive_data.host_keys = xcalloc(options.num_host_key_files,
1454
	    sizeof(Key *));
1457
	    sizeof(Key *));
1455
	for (i = 0; i < options.num_host_key_files; i++)
1456
		sensitive_data.host_keys[i] = NULL;
1457
1458
	for (i = 0; i < options.num_host_key_files; i++) {
1458
	for (i = 0; i < options.num_host_key_files; i++) {
1459
		key = key_load_private(options.host_key_files[i], "", NULL);
1459
		key = key_load_private(options.host_key_files[i], "", NULL);
1460
		sensitive_data.host_keys[i] = key;
1460
		sensitive_data.host_keys[i] = key;
(-)servconf.c (-3 / +14 lines)
Lines 773-784 parse_filename: Link Here
773
		if (!arg || *arg == '\0')
773
		if (!arg || *arg == '\0')
774
			fatal("%s line %d: missing file name.",
774
			fatal("%s line %d: missing file name.",
775
			    filename, linenum);
775
			    filename, linenum);
776
		cp = tilde_expand_filename(arg, getuid());
777
		if (*cp != '/')
778
			fatal("%s line %d: path is not absolute.",
779
			    filename, linenum);
776
		if (*activep && *charptr == NULL) {
780
		if (*activep && *charptr == NULL) {
777
			*charptr = tilde_expand_filename(arg, getuid());
781
			*charptr = cp;
778
			/* increase optional counter */
782
			/* increase optional counter */
779
			if (intptr != NULL)
783
			if (intptr != NULL)
780
				*intptr = *intptr + 1;
784
				*intptr = *intptr + 1;
781
		}
785
		} else
786
			xfree(cp);
782
		break;
787
		break;
783
788
784
	case sPidFile:
789
	case sPidFile:
Lines 1157-1163 parse_flag: Link Here
1157
		charptr = (opcode == sAuthorizedKeysFile) ?
1162
		charptr = (opcode == sAuthorizedKeysFile) ?
1158
		    &options->authorized_keys_file :
1163
		    &options->authorized_keys_file :
1159
		    &options->authorized_keys_file2;
1164
		    &options->authorized_keys_file2;
1160
		goto parse_filename;
1165
		arg = strdelim(&cp);
1166
		if (!arg || *arg == '\0')
1167
			fatal("%s line %d: missing file name.",
1168
			    filename, linenum);
1169
		if (*activep && *charptr == NULL)
1170
			*charptr = tilde_expand_filename(arg, getuid());
1171
		break;
1161
1172
1162
	case sClientAliveInterval:
1173
	case sClientAliveInterval:
1163
		intptr = &options->client_alive_interval;
1174
		intptr = &options->client_alive_interval;

Return to bug 1290