bool resolve;
unsigned char *fkey = NULL;
SilcUInt32 fkey_len = 0;
+ const char *cipher;
SILC_LOG_DEBUG(("Joining client to channel"));
if (!(channel->mode & SILC_CHANNEL_MODE_PRIVKEY)) {
tmp = silc_id_id2str(channel->id, SILC_ID_CHANNEL);
+ cipher = silc_cipher_get_name(channel->channel_key);
keyp = silc_channel_key_payload_encode(silc_id_get_len(channel->id,
SILC_ID_CHANNEL),
tmp,
- strlen(channel->channel_key->
- cipher->name),
- channel->channel_key->cipher->name,
+ strlen(cipher), cipher,
channel->key_len / 8, channel->key);
silc_free(tmp);
}
silc_server_send_channel_key(server, NULL, channel,
server->server_type == SILC_ROUTER ?
FALSE : !server->standalone);
-
- cipher = channel->channel_key->cipher->name;
+
+ cipher = (char *)silc_cipher_get_name(channel->channel_key);
hmac = (char *)silc_hmac_get_name(channel->hmac);
}
}
SilcServer server = cmd->server;
SilcClientEntry client = (SilcClientEntry)cmd->sock->user_data;
SilcIDListData idata = (SilcIDListData)client;
- SilcChannelID *channel_id;
- SilcClientID *client_id;
+ SilcChannelID *channel_id = NULL;
+ SilcClientID *client_id = NULL;
SilcChannelEntry channel;
SilcClientEntry target_client;
SilcChannelClientEntry chl;
packet->data, packet->len, FALSE);
silc_buffer_free(packet);
- silc_free(channel_id);
- silc_free(client_id);
silc_buffer_free(idp);
out:
+ silc_free(channel_id);
+ silc_free(client_id);
silc_free(fkey);
silc_server_command_free(cmd);
}
silc_server_command_send_status_reply(cmd, SILC_COMMAND_OPER,
SILC_STATUS_ERR_AUTH_FAILED,
0);
+ SILC_LOG_INFO(("OPER authentication failed for username '%s' by"
+ "nickname '%s' from %s", username,
+ client->nickname, cmd->sock->hostname));
goto out;
}
}
if (!admin) {
silc_server_command_send_status_reply(cmd, SILC_COMMAND_SILCOPER,
SILC_STATUS_ERR_AUTH_FAILED, 0);
+ SILC_LOG_INFO(("SILCOPER authentication failed for username '%s' by"
+ "nickname '%s' from %s", username,
+ client->nickname, cmd->sock->hostname));
goto out;
}
}
goto out;
}
- if (server->server_type == SILC_ROUTER &&
+ if (server->server_type == SILC_ROUTER && !server->backup_router &&
client->mode & SILC_UMODE_SERVER_OPERATOR) {
silc_server_command_send_status_reply(cmd, SILC_COMMAND_PRIV_CONNECT,
SILC_STATUS_ERR_NO_ROUTER_PRIV, 0);