Merge branch 'authd-framework' of github.com:charybdis-ircd/charybdis into authd-framework
This commit is contained in:
commit
ec2301263e
11 changed files with 22 additions and 42 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -17,6 +17,7 @@ bandb/bantool
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
compile
|
compile
|
||||||
|
confdefs.h
|
||||||
config.guess
|
config.guess
|
||||||
config.sub
|
config.sub
|
||||||
depcomp
|
depcomp
|
||||||
|
@ -54,6 +55,7 @@ ircd/version.c
|
||||||
ircd/version.c.last
|
ircd/version.c.last
|
||||||
ssld/ssld
|
ssld/ssld
|
||||||
wsockd/wsockd
|
wsockd/wsockd
|
||||||
|
testsuite/ircd.pid.*
|
||||||
tools/charybdis-mkpasswd
|
tools/charybdis-mkpasswd
|
||||||
tools/genssl
|
tools/genssl
|
||||||
tools/mkpasswd
|
tools/mkpasswd
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#loadmodule "extensions/extb_realname";
|
#loadmodule "extensions/extb_realname";
|
||||||
#loadmodule "extensions/extb_server";
|
#loadmodule "extensions/extb_server";
|
||||||
#loadmodule "extensions/extb_ssl";
|
#loadmodule "extensions/extb_ssl";
|
||||||
|
#loadmodule "extensions/extb_usermode";
|
||||||
#loadmodule "extensions/hurt";
|
#loadmodule "extensions/hurt";
|
||||||
#loadmodule "extensions/m_extendchans";
|
#loadmodule "extensions/m_extendchans";
|
||||||
#loadmodule "extensions/m_findforwards";
|
#loadmodule "extensions/m_findforwards";
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
* Realname (gecos) bans (+b $r:mask) -- extb_realname
|
* Realname (gecos) bans (+b $r:mask) -- extb_realname
|
||||||
* Server bans (+b $s:mask) -- extb_server
|
* Server bans (+b $s:mask) -- extb_server
|
||||||
* SSL bans (+b $z) -- extb_ssl
|
* SSL bans (+b $z) -- extb_ssl
|
||||||
|
* User mode bans (+b $u:modes) -- extb_usermode
|
||||||
* Helpops system (umode +H) -- helpops
|
* Helpops system (umode +H) -- helpops
|
||||||
* HURT system -- hurt
|
* HURT system -- hurt
|
||||||
* New host mangling (umode +x) -- ip_cloaking_4.0
|
* New host mangling (umode +x) -- ip_cloaking_4.0
|
||||||
|
@ -95,6 +96,7 @@
|
||||||
#loadmodule "extensions/extb_realname";
|
#loadmodule "extensions/extb_realname";
|
||||||
#loadmodule "extensions/extb_server";
|
#loadmodule "extensions/extb_server";
|
||||||
#loadmodule "extensions/extb_ssl";
|
#loadmodule "extensions/extb_ssl";
|
||||||
|
#loadmodule "extensions/extb_usermode";
|
||||||
#loadmodule "extensions/helpops";
|
#loadmodule "extensions/helpops";
|
||||||
#loadmodule "extensions/hurt";
|
#loadmodule "extensions/hurt";
|
||||||
#loadmodule "extensions/ip_cloaking_4.0";
|
#loadmodule "extensions/ip_cloaking_4.0";
|
||||||
|
|
|
@ -26,7 +26,7 @@ DECLARE_MODULE_AV2(extb_usermode, _modinit, _moddeinit, NULL, NULL, NULL, NULL,
|
||||||
static int
|
static int
|
||||||
_modinit(void)
|
_modinit(void)
|
||||||
{
|
{
|
||||||
extban_table['m'] = eb_usermode;
|
extban_table['u'] = eb_usermode;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ _modinit(void)
|
||||||
static void
|
static void
|
||||||
_moddeinit(void)
|
_moddeinit(void)
|
||||||
{
|
{
|
||||||
extban_table['m'] = NULL;
|
extban_table['u'] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int eb_usermode(const char *data, struct Client *client_p,
|
static int eb_usermode(const char *data, struct Client *client_p,
|
||||||
|
|
|
@ -82,7 +82,7 @@ extern void add_to_id_hash(const char *, struct Client *);
|
||||||
extern void del_from_id_hash(const char *name, struct Client *client);
|
extern void del_from_id_hash(const char *name, struct Client *client);
|
||||||
extern struct Client *find_id(const char *name);
|
extern struct Client *find_id(const char *name);
|
||||||
|
|
||||||
extern struct Channel *get_or_create_channel(struct Client *client_p, const char *chname, int *isnew);
|
extern struct Channel *get_or_create_channel(struct Client *client_p, const char *chname, bool *isnew);
|
||||||
extern void del_from_channel_hash(const char *name, struct Channel *chan);
|
extern void del_from_channel_hash(const char *name, struct Channel *chan);
|
||||||
extern struct Channel *find_channel(const char *name);
|
extern struct Channel *find_channel(const char *name);
|
||||||
|
|
||||||
|
|
|
@ -65,9 +65,9 @@ extern const unsigned long int datecode;
|
||||||
extern const char *ircd_version;
|
extern const char *ircd_version;
|
||||||
extern const char *logFileName;
|
extern const char *logFileName;
|
||||||
extern const char *pidFileName;
|
extern const char *pidFileName;
|
||||||
extern bool dorehash;
|
extern volatile sig_atomic_t dorehash;
|
||||||
extern bool dorehashbans;
|
extern volatile sig_atomic_t dorehashbans;
|
||||||
extern bool doremotd;
|
extern volatile sig_atomic_t doremotd;
|
||||||
extern bool kline_queued;
|
extern bool kline_queued;
|
||||||
extern bool server_state_foreground;
|
extern bool server_state_foreground;
|
||||||
extern bool opers_see_all_users; /* sno_farconnect.so loaded, operspy without
|
extern bool opers_see_all_users; /* sno_farconnect.so loaded, operspy without
|
||||||
|
|
|
@ -405,7 +405,7 @@ find_channel(const char *name)
|
||||||
* block, if it didn't exist before).
|
* block, if it didn't exist before).
|
||||||
*/
|
*/
|
||||||
struct Channel *
|
struct Channel *
|
||||||
get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
|
get_or_create_channel(struct Client *client_p, const char *chname, bool *isnew)
|
||||||
{
|
{
|
||||||
struct Channel *chptr;
|
struct Channel *chptr;
|
||||||
int len;
|
int len;
|
||||||
|
@ -434,12 +434,12 @@ get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
|
||||||
if (chptr != NULL)
|
if (chptr != NULL)
|
||||||
{
|
{
|
||||||
if (isnew != NULL)
|
if (isnew != NULL)
|
||||||
*isnew = 0;
|
*isnew = false;
|
||||||
return chptr;
|
return chptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isnew != NULL)
|
if(isnew != NULL)
|
||||||
*isnew = 1;
|
*isnew = true;
|
||||||
|
|
||||||
chptr = allocate_channel(s);
|
chptr = allocate_channel(s);
|
||||||
chptr->channelts = rb_current_time(); /* doesn't hurt to set it here */
|
chptr->channelts = rb_current_time(); /* doesn't hurt to set it here */
|
||||||
|
|
|
@ -94,9 +94,9 @@ rb_dlink_list local_oper_list; /* our opers, duplicated in lclient_list */
|
||||||
rb_dlink_list oper_list; /* network opers */
|
rb_dlink_list oper_list; /* network opers */
|
||||||
|
|
||||||
char **myargv;
|
char **myargv;
|
||||||
bool dorehash = false;
|
volatile sig_atomic_t dorehash = false;
|
||||||
bool dorehashbans = false;
|
volatile sig_atomic_t dorehashbans = false;
|
||||||
bool doremotd = false;
|
volatile sig_atomic_t doremotd = false;
|
||||||
bool kline_queued = false;
|
bool kline_queued = false;
|
||||||
bool server_state_foreground = false;
|
bool server_state_foreground = false;
|
||||||
bool opers_see_all_users = false;
|
bool opers_see_all_users = false;
|
||||||
|
|
|
@ -395,7 +395,7 @@ ms_join(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_
|
||||||
static struct Mode mode;
|
static struct Mode mode;
|
||||||
time_t oldts;
|
time_t oldts;
|
||||||
time_t newts;
|
time_t newts;
|
||||||
int isnew;
|
bool isnew;
|
||||||
bool keep_our_modes = true;
|
bool keep_our_modes = true;
|
||||||
rb_dlink_node *ptr, *next_ptr;
|
rb_dlink_node *ptr, *next_ptr;
|
||||||
|
|
||||||
|
@ -512,7 +512,7 @@ ms_sjoin(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
|
||||||
bool keep_our_modes = true;
|
bool keep_our_modes = true;
|
||||||
bool keep_new_modes = true;
|
bool keep_new_modes = true;
|
||||||
int fl;
|
int fl;
|
||||||
int isnew;
|
bool isnew;
|
||||||
int mlen_uid;
|
int mlen_uid;
|
||||||
int len_uid;
|
int len_uid;
|
||||||
int len;
|
int len;
|
||||||
|
|
25
ssld/ssld.c
25
ssld/ssld.c
|
@ -824,31 +824,6 @@ process_stats(mod_ctl_t * ctl, mod_ctl_buf_t * ctlb)
|
||||||
mod_cmd_write_queue(ctl, outstat, strlen(outstat) + 1); /* +1 is so we send the \0 as well */
|
mod_cmd_write_queue(ctl, outstat, strlen(outstat) + 1); /* +1 is so we send the \0 as well */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
change_connid(mod_ctl_t *ctl, mod_ctl_buf_t *ctlb)
|
|
||||||
{
|
|
||||||
uint32_t id = buf_to_uint32(&ctlb->buf[1]);
|
|
||||||
uint32_t newid = buf_to_uint32(&ctlb->buf[5]);
|
|
||||||
conn_t *conn = conn_find_by_id(id);
|
|
||||||
lrb_assert(conn != NULL);
|
|
||||||
if(conn == NULL)
|
|
||||||
{
|
|
||||||
uint8_t buf[256];
|
|
||||||
int len;
|
|
||||||
|
|
||||||
buf[0] = 'D';
|
|
||||||
uint32_to_buf(&buf[1], newid);
|
|
||||||
sprintf((char *) &buf[5], "connid %d does not exist", id);
|
|
||||||
len = (strlen((char *) &buf[5]) + 1) + 5;
|
|
||||||
mod_cmd_write_queue(ctl, buf, len);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
rb_dlinkDelete(&conn->node, connid_hash(conn->id));
|
|
||||||
SetZipSSL(conn);
|
|
||||||
conn->id = newid;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBZ
|
#ifdef HAVE_LIBZ
|
||||||
static void
|
static void
|
||||||
zlib_process(mod_ctl_t * ctl, mod_ctl_buf_t * ctlb)
|
zlib_process(mod_ctl_t * ctl, mod_ctl_buf_t * ctlb)
|
||||||
|
|
|
@ -3,6 +3,6 @@ testdir=`pwd`
|
||||||
prefix=`sed -n -e 's/^#define IRCD_PREFIX "\(.*\)"/\1/p' "$testdir/../include/setup.h"`
|
prefix=`sed -n -e 's/^#define IRCD_PREFIX "\(.*\)"/\1/p' "$testdir/../include/setup.h"`
|
||||||
[ -d $prefix ] || { echo Unable to find installation prefix; exit 1; }
|
[ -d $prefix ] || { echo Unable to find installation prefix; exit 1; }
|
||||||
|
|
||||||
$prefix/bin/ircd -configfile $testdir/ircd.conf.1 -pidfile $testdir/ircd.pid.1
|
$prefix/bin/charybdis -configfile $testdir/ircd.conf.1 -pidfile $testdir/ircd.pid.1
|
||||||
$prefix/bin/ircd -configfile $testdir/ircd.conf.2 -pidfile $testdir/ircd.pid.2
|
$prefix/bin/charybdis -configfile $testdir/ircd.conf.2 -pidfile $testdir/ircd.pid.2
|
||||||
$prefix/bin/ircd -configfile $testdir/ircd.conf.3 -pidfile $testdir/ircd.pid.3
|
$prefix/bin/charybdis -configfile $testdir/ircd.conf.3 -pidfile $testdir/ircd.pid.3
|
||||||
|
|
Loading…
Reference in a new issue