From: Pekka Riikonen Date: Sun, 2 Dec 2001 21:30:13 +0000 (+0000) Subject: updates. X-Git-Tag: silc.toolkit.0.7~4 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=215982eeb4b408dc7e0105342452137aff4562f3 updates. --- diff --git a/CHANGES b/CHANGES index bb563c34..4f5bba2b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,12 @@ +Sun Dec 2 23:29:07 EET 2001 Pekka Riikonen + + * If we are normal server, and we've not resolved client info + in WHOIS or IDENTIFY from router, and it is global client, + we'll check whether it is on some channel. If it is not + then we cannot be sure about its validity and will resolve it + from router. Fixes a bug in WHOIS and IDENTIFY. Affected + file silcd/command.c. + Sun Dec 2 13:48:46 EET 2001 Pekka Riikonen * Distribute to the channel passphrase in CMODE_CHANGE notify. diff --git a/TODO b/TODO index d080e0ca..81f10492 100644 --- a/TODO +++ b/TODO @@ -41,10 +41,6 @@ TODO/bugs In SILC Server o Channel user mode changes are notified unnecessarely when switching to backup router on router crash. - o If client's public key is saved in the server (and doing public key - authentication) then the hostname and the username information could - be taken from the public key. Should be a configuration option! - o Add a timeout to handling incoming JOIN commands. It should be enforced that JOIN command is executed only once in a second or two seconds. Now it is possible to accept n incoming JOIN commands @@ -71,6 +67,10 @@ TODO/bugs In SILC Server serverconfig.c. They can be defined but they are totally ignored currently. And they should be redefined also. + o If client's public key is saved in the server (and doing public key + authentication) then the hostname and the username information could + be taken from the public key. Should be a configuration option! + TODO/bugs In SILC Libraries =========================== diff --git a/apps/silcd/command.c b/apps/silcd/command.c index d523172c..ae85305a 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -547,12 +547,23 @@ silc_server_command_whois_check(SilcServerCommandContext cmd, for (i = 0; i < clients_count; i++) { entry = clients[i]; - - if (!entry || (entry->nickname && entry->username && entry->userinfo) || - !(entry->data.status & SILC_IDLIST_STATUS_REGISTERED) || - !entry->router) + if (!entry) continue; + if ((entry->nickname && entry->username && entry->userinfo) || + !(entry->data.status & SILC_IDLIST_STATUS_REGISTERED)) { + if (!entry->router) + continue; + + /* If we are normal server, and we've not resolved this client from + router and it is global client, we'll check whether it is on some + channel. If not then we cannot be sure about its validity, and + we'll resolve it from router. */ + if (cmd->server->server_type != SILC_SERVER || cmd->pending || + entry->connection || silc_hash_table_count(entry->channels)) + continue; + } + /* We need to resolve this entry since it is not complete */ if (!cmd->pending && entry->data.status & SILC_IDLIST_STATUS_RESOLVING) { @@ -1378,6 +1389,7 @@ silc_server_command_identify_parse(SilcServerCommandContext cmd, } else { /* Command includes ID, we must use that. Also check whether the command has more than one ID set - take them all. */ + *names = FALSE; /* Take all ID's from the command packet */ for (i = 0; i < argc; i++) { @@ -1496,12 +1508,23 @@ silc_server_command_identify_check_client(SilcServerCommandContext cmd, for (i = 0; i < clients_count; i++) { entry = clients[i]; - - if (!entry || entry->nickname || - !(entry->data.status & SILC_IDLIST_STATUS_REGISTERED) || - !entry->router) + if (!entry) continue; + if (entry->nickname || + !(entry->data.status & SILC_IDLIST_STATUS_REGISTERED)) { + if (!entry->router) + continue; + + /* If we are normal server, and we've not resolved this client from + router and it is global client, we'll check whether it is on some + channel. If not then we cannot be sure about its validity, and + we'll resolve it from router. */ + if (cmd->server->server_type != SILC_SERVER || cmd->pending || + entry->connection || silc_hash_table_count(entry->channels)) + continue; + } + /* We need to resolve this entry since it is not complete */ if (!cmd->pending && entry->data.status & SILC_IDLIST_STATUS_RESOLVING) {