From 5a2380c2cdd6f648a86434bef1c28a7756a36060 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 28 Apr 2007 18:23:55 +0000 Subject: [PATCH] Return correct command type in SILCOPER in case of error. Do not check for too new protocol version during SKE as per silcd.conf(5). --- CHANGES | 13 +++++++++++++ apps/silcd/command.c | 4 ++-- apps/silcd/protocol.c | 17 +---------------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/CHANGES b/CHANGES index 745717d0..43cdbb60 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +Sat Apr 28 21:19:45 EEST 2007 Pekka Riikonen + + * Do not check for too new protocol version in during SKE, + per the documented feature in silcd.conf(5). + Wed Mar 7 18:38:18 CET 2007 Jochen Eisinger * Fixed a core-dump when joining unknown channels. Affected @@ -20,6 +25,14 @@ Mon Mar 5 23:27:32 CET 2007 Jochen Eisinger * Update patch to makefile from trunk so parallel make will link the silc-client correctly. Affected file lib/Makefile.ad +Mon Dec 11 19:43:37 CET 2006 Pekka Riikonen + + * Check for NULL SKE in rekey error handling. Affected file + apps/silcd/protocol.c. + + * Return correct command in SILCOPER command in case of error. + Affected file apps/silcd/command.c. + Sun Nov 19 18:58:26 CET 2006 Jochen Eisinger * Import perl script for sign_messages from silc-plugin. Affected diff --git a/apps/silcd/command.c b/apps/silcd/command.c index ed0964fc..a42d254c 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -4486,7 +4486,7 @@ SILC_SERVER_CMD_FUNC(silcoper) username = silc_identifier_check(username, tmp_len, SILC_STRING_UTF8, 128, &tmp_len); if (!username) { - silc_server_command_send_status_reply(cmd, SILC_COMMAND_OPER, + silc_server_command_send_status_reply(cmd, SILC_COMMAND_SILCOPER, SILC_STATUS_ERR_BAD_USERNAME, 0); goto out; @@ -4533,7 +4533,7 @@ SILC_SERVER_CMD_FUNC(silcoper) } if (!result) { /* Authentication failed */ - silc_server_command_send_status_reply(cmd, SILC_COMMAND_OPER, + silc_server_command_send_status_reply(cmd, SILC_COMMAND_SILCOPER, SILC_STATUS_ERR_AUTH_FAILED, 0); goto out; } diff --git a/apps/silcd/protocol.c b/apps/silcd/protocol.c index dd80fd0d..f20f1336 100644 --- a/apps/silcd/protocol.c +++ b/apps/silcd/protocol.c @@ -326,7 +326,7 @@ int silc_server_protocol_ke_set_keys(SilcServer server, SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version, SilcUInt32 len, void *context) { - SilcUInt32 l_protocol_version = 0, r_protocol_version = 0; + SilcUInt32 r_protocol_version = 0; SILC_LOG_INFO(("%s (%s) is version %s", ske->sock->hostname, ske->sock->ip, version)); @@ -338,21 +338,6 @@ SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version, return SILC_SKE_STATUS_BAD_VERSION; } - if (!silc_parse_version_string(silc_version_string, - &l_protocol_version, NULL, NULL, - NULL, NULL)) { - SILC_LOG_ERROR(("%s (%s) %s is not allowed/supported version", - ske->sock->hostname, ske->sock->ip, version)); - return SILC_SKE_STATUS_BAD_VERSION; - } - - /* If remote is too new, don't connect */ - if (l_protocol_version < r_protocol_version) { - SILC_LOG_ERROR(("%s (%s) %s is not allowed/supported version", - ske->sock->hostname, ske->sock->ip, version)); - return SILC_SKE_STATUS_BAD_VERSION; - } - ske->sock->version = r_protocol_version; return SILC_SKE_STATUS_OK; -- 2.24.0