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

(-)3_0_2p1.1/sshd.c (-1 / +8 lines)
Lines 330-336 Link Here
330
		major = PROTOCOL_MAJOR_1;
330
		major = PROTOCOL_MAJOR_1;
331
		minor = PROTOCOL_MINOR_1;
331
		minor = PROTOCOL_MINOR_1;
332
	}
332
	}
333
	snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_VERSION);
333
334
	if (options.commentstring == NULL) 
335
		snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, 
336
		    options.versionstring);
337
	else 
338
		snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s %.100s\n", major, 
339
		    minor, options.versionstring, options.commentstring);
340
334
	server_version_string = xstrdup(buf);
341
	server_version_string = xstrdup(buf);
335
342
336
	if (client_version_string == NULL) {
343
	if (client_version_string == NULL) {
(-)3_0_2p1.1/servconf.h (+2 lines)
Lines 129-134 Link Here
129
	char   *authorized_keys_file;	/* File containing public keys */
129
	char   *authorized_keys_file;	/* File containing public keys */
130
	char   *authorized_keys_file2;
130
	char   *authorized_keys_file2;
131
	int	pam_authentication_via_kbd_int;
131
	int	pam_authentication_via_kbd_int;
132
	char   *versionstring;
133
	char   *commentstring;
132
134
133
}       ServerOptions;
135
}       ServerOptions;
134
136
(-)3_0_2p1.1/servconf.c (+31 lines)
Lines 109-114 Link Here
109
	options->client_alive_count_max = -1;
109
	options->client_alive_count_max = -1;
110
	options->authorized_keys_file = NULL;
110
	options->authorized_keys_file = NULL;
111
	options->authorized_keys_file2 = NULL;
111
	options->authorized_keys_file2 = NULL;
112
	options->versionstring = NULL;
113
	options->commentstring = NULL;
112
}
114
}
113
115
114
void
116
void
Lines 229-234 Link Here
229
	}
231
	}
230
	if (options->authorized_keys_file == NULL)
232
	if (options->authorized_keys_file == NULL)
231
		options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS;
233
		options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS;
234
	if (options->versionstring == NULL)
235
		options->versionstring = SSH_VERSION;
232
}
236
}
233
237
234
/* Keyword tokens. */
238
/* Keyword tokens. */
Lines 261-266 Link Here
261
	sBanner, sReverseMappingCheck, sHostbasedAuthentication,
265
	sBanner, sReverseMappingCheck, sHostbasedAuthentication,
262
	sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, 
266
	sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, 
263
	sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2,
267
	sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2,
268
	sVersionString, sCommentString,
264
	sDeprecated 
269
	sDeprecated 
265
} ServerOpCodes;
270
} ServerOpCodes;
266
271
Lines 334-339 Link Here
334
	{ "clientalivecountmax", sClientAliveCountMax },
339
	{ "clientalivecountmax", sClientAliveCountMax },
335
	{ "authorizedkeysfile", sAuthorizedKeysFile },
340
	{ "authorizedkeysfile", sAuthorizedKeysFile },
336
	{ "authorizedkeysfile2", sAuthorizedKeysFile2 },
341
	{ "authorizedkeysfile2", sAuthorizedKeysFile2 },
342
	{ "versionstring", sVersionString},
343
	{ "commentstring", sCommentString},
337
	{ NULL, 0 }
344
	{ NULL, 0 }
338
};
345
};
339
346
Lines 864-869 Link Here
864
			    filename, linenum, arg);
871
			    filename, linenum, arg);
865
			while(arg)
872
			while(arg)
866
			    arg = strdelim(&cp);
873
			    arg = strdelim(&cp);
874
			break;
875
876
		case sVersionString:
877
			charptr = &options->versionstring;
878
			arg = strdelim(&cp);
879
			if (!arg || *arg == '\0')
880
				fatal("%s line %d: missing version name.",
881
				    filename, linenum);
882
			if ((p = strchr(arg, (int)'-')) != NULL)
883
				fatal("%s line %d: bad VersionString usage.",
884
				    filename, linenum);
885
			*charptr = xstrdup(arg);
886
			break;
887
888
		case sCommentString:
889
			charptr = &options->commentstring;
890
			arg = strdelim(&cp);
891
			if (!arg || *arg == '\0')
892
				fatal("%s line %d: missing version name.",
893
				    filename, linenum);
894
			if ((p = strchr(arg, (int)'-')) != NULL)
895
				fatal("%s line %d: bad CommentString usage.",
896
				    filename, linenum);
897
			*charptr = xstrdup(arg);
867
			break;
898
			break;
868
899
869
		default:
900
		default:

Return to bug 94