not check anymore for the mlock(). Affected file is
configure.in.pre.
+ * Fixed USERS command in server to allow the execution of the
+ command for private and secret channels if the client sending
+ the command is on the channel. Affected file silcd/command.c.
+
+ * Fixed silc_client_get_clients_local to return the clients
+ count correctly. It could return wrong value. Affected file
+ lib/silcclient/idlist.c.
+
Mon Sep 3 20:09:59 EEST 2001 Pekka Riikonen <priikone@silcnet.org>
* Fixed the lib/silcmath/mpi/mpi.h to always use 32-bit data
TODO/bugs In SILC Client Library
================================
- o The public key authentication is missing for example in OPER and SILCOPER
- commands. See the XXX's in the lib/silcclient/command.c.
-
o The client library must manage somehow when receiving client that has
same nickname, same server, same username but different Client ID than
what we have in the cache. It is now assumed that they are different
interface separately or it could just remove the old client unless
it is on some channels.
+ o The public key authentication is missing for example in OPER and SILCOPER
+ commands. See the XXX's in the lib/silcclient/command.c.
+
TODO/bugs In SILC Server
========================
}
}
- /* If the channel is private or secret do not send anything */
- if (channel->mode & (SILC_CHANNEL_MODE_PRIVATE | SILC_CHANNEL_MODE_SECRET)) {
- silc_server_command_send_status_reply(cmd, SILC_COMMAND_USERS,
- SILC_STATUS_ERR_NO_SUCH_CHANNEL);
- goto out;
+ /* If the channel is private or secret do not send anything, unless the
+ user requesting this command is on the channel. */
+ if (cmd->sock->type == SILC_SOCKET_TYPE_CLIENT) {
+ if (channel->mode & (SILC_CHANNEL_MODE_PRIVATE | SILC_CHANNEL_MODE_SECRET)
+ && !silc_server_client_on_channel(cmd->sock->user_data, channel)) {
+ silc_server_command_send_status_reply(cmd, SILC_COMMAND_USERS,
+ SILC_STATUS_ERR_NO_SUCH_CHANNEL);
+ goto out;
+ }
+ } else {
+ if (channel->mode &
+ (SILC_CHANNEL_MODE_PRIVATE | SILC_CHANNEL_MODE_SECRET)) {
+ silc_server_command_send_status_reply(cmd, SILC_COMMAND_USERS,
+ SILC_STATUS_ERR_NO_SUCH_CHANNEL);
+ goto out;
+ }
}
/* Get the users list */
#
[RouterConnection]
#10.2.1.100:passwd:veryverysecret:706:1:1:1
+#10.2.100.131:pubkey:/path/to/the/publickey:706:1:1:1
#
# Denied connections.
}
if (cmd->argc < 2 || cmd->argc > 3) {
- cmd->client->ops->say(cmd->client, conn, SILC_CLIENT_MESSAGE_INFO,
- "Usage: /IDENTIFY <nickname>[@<server>] [<count>]");
COMMAND_ERROR;
goto out;
}
SilcIDCacheList list = NULL;
SilcClientEntry entry, *clients;
int i = 0;
+ bool found = FALSE;
/* Find ID from cache */
if (!silc_idcache_find_by_name(conn->client_cache, nickname, &list))
silc_idcache_list_first(list, &id_cache);
while (id_cache) {
clients[i++] = id_cache->context;
+ found = TRUE;
if (!silc_idcache_list_next(list, &id_cache))
break;
}
}
clients[i++] = id_cache->context;
+ found = TRUE;
if (!silc_idcache_list_next(list, &id_cache))
break;
}
if (list)
silc_idcache_list_free(list);
+ if (!found) {
+ *clients_count = 0;
+ if (clients)
+ silc_free(clients);
+ return NULL;
+ }
+
return clients;
}