1
0
forked from bip/bip
change some log levels
remove ssl_check_store from connection
indent fixes
check_rlimits: change explain text
Git-explicit version
This commit is contained in:
Loc Gomez 2007-09-27 14:12:27 +02:00
parent 2090349f9c
commit 12ea45b132
7 changed files with 10 additions and 42 deletions

View File

@ -272,9 +272,7 @@ bip_t *_bip;
void rlimit_cpu_reached(int i)
{
mylog(LOG_WARN, "This process has reached the CPU time usage limit. "
"It means bip'll be killed by the Operating System in a short "
"notice. We advise you to use a crontab to restart bip "
"whenever this happens.");
"It means bip will be killed by the Operating System soon.");
}
void rlimit_bigfile_reached(int i)
@ -375,7 +373,6 @@ static int add_connection(bip_t *bip, struct user *user, list_t *data)
l->log = log_new(user, name);
#ifdef HAVE_LIBSSL
l->ssl_check_mode = user->ssl_check_mode;
l->ssl_check_store = user->ssl_check_store;
l->untrusted_certs = sk_X509_new_null();
#endif
} else {
@ -752,7 +749,8 @@ static void log_file_setup(void)
}
}
void check_rlimits() {
void check_rlimits()
{
int r, cklim;
struct rlimit lt;
@ -1390,7 +1388,7 @@ int adm_trust(struct link_client *ic, struct line *line)
if (!strcasecmp(line->elemv[2], "OK")) {
/* OK, attempt to trust the cert! */
BIO *bio = BIO_new_file(LINK(ic)->ssl_check_store, "a+");
BIO *bio = BIO_new_file(LINK(ic)->user->ssl_check_store, "a+");
X509 *trustcert = sk_X509_shift(LINK(ic)->untrusted_certs);
if(!bio || !trustcert ||

View File

@ -14,34 +14,6 @@
#ifndef BIP_H
#define BIP_H
#if 0
struct c_connection
{
char *name;
struct c_network *network;
char *realname, *user, *nick;
char *password; /* server pass */
char *vhost;
unsigned short source_port;
list_t channell;
int follow_nick;
int ignore_first_nick;
char *away_nick;
list_t on_connect_send;
char *no_client_away_msg;
struct client *client;
struct c_user *bipuser;
};
struct c_channel
{
char *name;
char *key;
};
#endif
#ifdef HAVE_LIBSSL
int adm_trust(struct link_client *ic, struct line *line);
#endif

View File

@ -209,7 +209,7 @@ static int _write_socket_SSL(connection_t *cn, char* message)
if (count != size) {
/* abnormal : openssl keeps writing until message is not fully
* sent */
mylog(LOG_WARN, "only %d written while message length is %d",
mylog(LOG_DEBUG, "only %d written while message length is %d",
count,size);
}
@ -995,7 +995,6 @@ static connection_t *connection_init(int anti_flood, int ssl, int timeout,
conn->ssl_ctx_h = NULL;
conn->ssl_h = NULL;
conn->cert = NULL;
conn->ssl_check_store = NULL;
conn->ssl_check_mode = SSL_CHECK_NONE;
#endif
conn->connected = CONN_NEW;
@ -1300,7 +1299,6 @@ static connection_t *_connection_new_SSL(char *dsthostname, char *dstport,
}
conn->cert = NULL;
conn->ssl_check_mode = check_mode;
conn->ssl_check_store = check_store;
switch (conn->ssl_check_mode) {
case SSL_CHECK_BASIC:

View File

@ -85,7 +85,6 @@ typedef struct connection {
SSL_CTX *ssl_ctx_h;
SSL *ssl_h;
int ssl_check_mode;
char *ssl_check_store;
X509 *cert;
#endif
} connection_t;

View File

@ -2007,7 +2007,7 @@ connection_t *irc_server_connect(struct link *link)
link->vhost, link->bind_port,
#ifdef HAVE_LIBSSL
link->network->ssl, link->ssl_check_mode,
link->ssl_check_store,
link->user->ssl_check_store,
#else
0, 0, NULL,
#endif
@ -2470,7 +2470,6 @@ void link_kill(bip_t *bip, struct link *link)
MAYFREE(link->connect_nick);
MAYFREE(link->vhost);
#ifdef HAVE_LIBSSL
MAYFREE(link->ssl_check_store);
sk_X509_free(link->untrusted_certs);
#endif
}

View File

@ -84,8 +84,11 @@ struct user {
int backlog_no_timestamp;
int blreset_on_talk;
#ifdef HAVE_LIBSSL
int ssl_check_mode;
char *ssl_check_store;
#endif
hash_t connections;
};
@ -152,7 +155,6 @@ struct link {
#ifdef HAVE_LIBSSL
int ssl_check_mode;
char *ssl_check_store;
STACK_OF(X509) *untrusted_certs;
#endif
};

View File

@ -1 +1 @@
#define BIP_VERSION "0.6.1"
#define BIP_VERSION "0.6.1.GIT.UNRELEASED"