+Fri Jan 2 23:34:17 EET 2004 Pekka Riikonen <priikone@silcnet.org>
+
+ * Fixed the CUMODE channel founder authentication on normal
+ server to not remove the founder rights on existing founder
+ before checking that router accepts the mode change. Affected
+ files are silcd/command.c and silcd/packet_receive.c.
+
+ * Remove the server entry correctly when rekey timeouts and
+ remote router connection on normal server is closed. Fixes
+ a crash where server uses the freed server entry. Affected
+ file silcd/server.c.
+
Fri Jan 02 10:28:15 CET 2004 Jochen Eisinger <jochen@penguin-breeder.org>
* Add /SILCNET [ADD|REMOVE|LIST] command to manage different SILC
networks. This is the first step in solving the bug about
- /SERVER ADD -silcnet <silcnet>. Affected files
+ /SERVER ADD -silcnet <silcnet>. Affected files
irssi/docs/in/silcnet.in; irssi/src/fe-common/silc/Makefile.am,
fe-silcnet.c, fe-common-silc.c, module-formats.[ch];
irssi/src/silc/core/silc-chatnets.[ch], silc-core.c, Makefile.am
* Make the session data filename configurable. This makes it
possible to have different session files for different
SILC networks. Affected files irssi/src/silc/core/silc-core.c,
- client_ops.[ch], silc-servers.c,
+ client_ops.[ch], silc-servers.c,
irssi/src/silc/fe-common/silc/module-formats.[ch]
* Use the same set of libtool files for the MPI lib as for the
search error. Added support in send_reply to send errors
without specific argument. Affected file silcd/server_query.c.
- * Fixed the WHOIS, IDENTIFY and WHOWAS error handling in SILC
+ * Fixed the WHOIS, IDENTIFY and WHOWAS error handling in SILC
Client for NO_SUCH_NICK. It was against the protocol specs.
Affected file irssi/src/silc/core/client_ops.c.
Sat Dec 20 00:44:47 CET 2003 Patrik Weiskircher <pat@icore.at>
- * fixed a bug in the whois using attributes function where no
+ * fixed a bug in the whois using attributes function where no
error was sent if no nickname and client id but the attributes were
given to whois. Affected file silcd/server_query.c
Thu Dec 04 11:33:46 CET 2003 Jochen Eisinger <jochen@penguin-breeder.org>
- * Initialize the variable idletag, since it is tested in
+ * Initialize the variable idletag, since it is tested in
silc_core_deinit for its default value. Affected file
irssi/src/silc/core/silc-core.c
TODO for SILC Server 1.0
========================
- o Check that +of works correctly when same client is +of already on
- some other server on same channel.
-
o Check that founder key is distributed ok during backup resuming.
o invite (with @server!*@host) not working from normal server/backup
Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2003 Pekka Riikonen
+ Copyright (C) 1997 - 2004 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Send to primary router only if we don't know the server
* the client requested or if the server is not locally connected */
- if ((!entry || !(entry->data.status & SILC_IDLIST_STATUS_LOCAL))
+ if ((!entry || !(entry->data.status & SILC_IDLIST_STATUS_LOCAL))
&& !cmd->pending && !server->standalone) {
/* Send to the primary router */
SilcBuffer tmpbuf;
/* Get target client's entry */
target_client = silc_idlist_find_client_by_id(server->local_list,
client_id, TRUE, NULL);
- if (!target_client) {
+ if (!target_client)
target_client = silc_idlist_find_client_by_id(server->global_list,
client_id, TRUE, NULL);
- }
if (target_client != client &&
!(sender_mask & SILC_CHANNEL_UMODE_CHANFO) &&
!(sender_mask & SILC_CHANNEL_UMODE_CHANOP)) {
silc_server_command_send_status_data(cmd, SILC_COMMAND_CUMODE,
- SILC_STATUS_ERR_NO_CHANNEL_PRIV, 0,
+ SILC_STATUS_ERR_NOT_YOU, 0,
2, tmp_ch_id, tmp_ch_len);
goto out;
}
if (target_mask & SILC_CHANNEL_UMODE_CHANFO) {
if (target_client != client) {
silc_server_command_send_status_reply(cmd, SILC_COMMAND_CUMODE,
- SILC_STATUS_ERR_NOT_YOU, 0);
+ SILC_STATUS_ERR_NO_CHANNEL_FOPRIV,
+ 0);
goto out;
}
}
/* There cannot be anyone else as founder on the channel now. This
- client is definitely the founder due to this authentication */
- silc_hash_table_list(channel->user_list, &htl);
- while (silc_hash_table_get(&htl, NULL, (void *)&chl2))
- if (chl2->mode & SILC_CHANNEL_UMODE_CHANFO) {
- chl2->mode &= ~SILC_CHANNEL_UMODE_CHANFO;
- silc_server_force_cumode_change(server, NULL, channel, chl2,
- chl2->mode);
- break;
- }
- silc_hash_table_list_reset(&htl);
+ client is definitely the founder due to this authentication. This
+ is done only on router, not on server, since server cannot know
+ whether router will accept this mode change or not. XXX This
+ probably shouldn't be done anymore at all, may cause problems in
+ router-router connections too (maybe just AUTH_FAILED error should
+ be returned). -Pekka */
+ if (server->server_type == SILC_ROUTER) {
+ silc_hash_table_list(channel->user_list, &htl);
+ while (silc_hash_table_get(&htl, NULL, (void *)&chl2))
+ if (chl2->mode & SILC_CHANNEL_UMODE_CHANFO) {
+ chl2->mode &= ~SILC_CHANNEL_UMODE_CHANFO;
+ silc_server_force_cumode_change(server, NULL, channel, chl2,
+ chl2->mode);
+ break;
+ }
+ silc_hash_table_list_reset(&htl);
+ }
sender_mask = chl->mode |= SILC_CHANNEL_UMODE_CHANFO;
}
Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2003 Pekka Riikonen
+ Copyright (C) 1997 - 2004 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
silc_hash_table_list(channel->user_list, &htl);
while (silc_hash_table_get(&htl, NULL, (void *)&chl2))
if (chl2->mode & SILC_CHANNEL_UMODE_CHANFO) {
+ SILC_LOG_DEBUG(("Founder already on channel"));
chl->mode = mode &= ~SILC_CHANNEL_UMODE_CHANFO;
silc_server_force_cumode_change(server, sock, channel,
chl, mode);
if (!(mode & SILC_CHANNEL_UMODE_CHANFO))
break;
- /* Founder not found of the channel. Since the founder auth mode
+ /* Founder not found on the channel. Since the founder auth mode
is set on the channel now check whether this is the client that
originally set the mode. */
if (!tmp || !silc_pkcs_public_key_payload_decode(tmp, tmp_len,
&founder_key)) {
chl->mode = mode &= ~SILC_CHANNEL_UMODE_CHANFO;
+ SILC_LOG_DEBUG(("Founder public key not present"));
silc_server_force_cumode_change(server, sock, channel, chl, mode);
notify_sent = TRUE;
break;
if (!silc_pkcs_public_key_compare(channel->founder_key,
founder_key)) {
chl->mode = mode &= ~SILC_CHANNEL_UMODE_CHANFO;
+ SILC_LOG_DEBUG(("Founder public key mismatch"));
silc_server_force_cumode_change(server, sock, channel, chl, mode);
notify_sent = TRUE;
break;
/* There cannot be anyone else as founder on the channel now. This
client is definitely the founder due to this 'authentication'.
- We trust the server did the actual authentication earlier. */
+ We trust the server did the actual signature verification
+ earlier (bad, yes). */
silc_hash_table_list(channel->user_list, &htl);
while (silc_hash_table_get(&htl, NULL, (void *)&chl2))
if (chl2->mode & SILC_CHANNEL_UMODE_CHANFO) {
chl2->mode &= ~SILC_CHANNEL_UMODE_CHANFO;
+ SILC_LOG_DEBUG(("Removing old founder rights, new authenticated"));
silc_server_force_cumode_change(server, NULL, channel, chl2,
chl2->mode);
break;