1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-28 19:56:38 +02:00

3-2beta13

This commit is contained in:
stskeeps
2002-12-09 20:13:51 +00:00
parent 51e5031fbd
commit b6cef35228
77 changed files with 7449 additions and 6704 deletions
+2 -2
View File
@@ -28,13 +28,13 @@ typedef struct {
#define AUTHTYPE_UNIXCRYPT 1
#define AUTHTYPE_MD5 2
#define AUTHTYPE_SHA1 3
#define AUTHTYPE_SSL_PUBKEY 4
#define AUTHTYPE_SSL_CLIENTCERT 4
#define AUTHTYPE_RIPEMD160 5
#ifdef USE_SSL
#define AUTHENABLE_MD5
#define AUTHENABLE_SHA1
#define AUTHENABLE_SSL_PUBKEY
#define AUTHENABLE_SSL_CLIENTCERT
#define AUTHENABLE_RIPEMD160
/* OpenSSL provides a crypt() */
#ifndef AUTHENABLE_UNIXCRYPT
+5 -25
View File
@@ -359,28 +359,12 @@
* If you start the server as root but wish to have it run as another user,
* define IRC_UID to that UID. This should only be defined if you are running
* as root and even then perhaps not.
* use #define IRC_UID <uid>
* and #define IRC_GID <gid>
*/
/*
* Ok this one is being changed. it is advisable never to run anything that
* uses sockets etc. and has the potential for the outside world to connect to it
* to run as root... Hackers do things like buffer overruns, and get dumped on
* a shell with root access effectivley ... so DONT do it.. if a program uses a
* port <1024 it will run as root, once the program has binded to the socket it
* will set its uid to something OTHER than root ... you set that in unrealircd.conf
*
* If you _must_ insist on running as root and not wanting the program to change its
* UID, then define BIG_SECURITY_HOLE below
*/
#if !defined(_WIN32)
/* Change This Line Below \/ */
#define BIG_SECURITY_HOLE
/* Its the one above ^^^^^^^ */
#ifndef BIG_SECURITY_HOLE
#define IRC_UID un_uid
#define IRC_GID un_gid
#endif
#endif
#undef IRC_UID
#undef IRC_GID
/*
* CLIENT_FLOOD
@@ -617,13 +601,9 @@ error You stuffed up config.h signals
# define stricmp strcasecmp
# define strnicmp strncasecmp
#if defined(CLIENT_FLOOD)
# if (CLIENT_FLOOD > 8000)
# define CLIENT_FLOOD 8000
# else
# if (CLIENT_FLOOD < 512)
error CLIENT_FLOOD needs redefining.
# endif
# endif
#else
error CLIENT_FLOOD undefined
#endif
+4 -1
View File
@@ -76,6 +76,8 @@ struct zConfiguration {
#ifdef USE_SSL
char *x_server_cert_pem;
char *x_server_key_pem;
char *trusted_ca_file;
long ssl_options;
#endif
aNetwork network;
};
@@ -129,4 +131,5 @@ extern aConfiguration iConf;
#define CLOAK_KEY2 iConf.network.key2
#define CLOAK_KEY3 iConf.network.key3
#define CLOAK_KEYCRC iConf.network.keycrc
#define STATIC_QUIT iConf.static_quit
#define STATIC_QUIT iConf.static_quit
+21 -10
View File
@@ -93,8 +93,6 @@ extern ConfigItem_deny_link *conf_deny_link;
extern ConfigItem_allow_channel *conf_allow_channel;
extern ConfigItem_deny_version *conf_deny_version;
extern ConfigItem_log *conf_log;
extern ConfigItem_unknown *conf_unknown;
extern ConfigItem_unknown_ext *conf_unknown_set;
extern ConfigItem_alias *conf_alias;
extern ConfigItem_include *conf_include;
extern ConfigItem_help *conf_help;
@@ -107,6 +105,7 @@ extern long set_usermode(char *umode);
extern char *get_modestr(long umodes);
extern void tkl_stats(aClient *cptr);
extern void config_error(char *format, ...);
extern int config_verbose;
extern void config_progress(char *format, ...);
extern void ipport_seperate(char *string, char **ip, char **port);
ConfigItem_class *Find_class(char *name);
@@ -271,14 +270,16 @@ extern void sendto_channels_inviso_part(aClient *user);
extern void sendto_channels_inviso_join(aClient *user);
extern void sendto_message_one(aClient *to, aClient *from, char *sender,
char *cmd, char *nick, char *msg);
#define PREFIX_ALL 0
#define PREFIX_HALFOP 0x1
#define PREFIX_VOICE 0x2
#define PREFIX_OP 0x4
extern void sendto_channelprefix_butone(aClient *one, aClient *from, aChannel *chptr,
int prefix, char *pattern, ...);
extern void sendto_channelprefix_butone_tok(aClient *one, aClient *from, aChannel *chptr,
int prefix, char *cmd, char *tok, char *nick, char *text);
extern void sendto_channel_butone(aClient *, aClient *, aChannel *, char *,
...);
extern void sendto_channelops_butone(aClient *, aClient *, aChannel *,
char *, ...);
extern void sendto_channelvoice_butone(aClient *, aClient *, aChannel *,
char *, ...);
extern void sendto_serv_butone(aClient *, char *, ...);
extern void sendto_serv_butone_quit(aClient *, char *, ...);
extern void sendto_serv_butone_sjoin(aClient *, char *, ...);
@@ -467,6 +468,8 @@ extern void add_CommandX(char *cmd, char *token, int (*func)(), unsigned char
/* CRULE */
char *crule_parse(char *);
int crule_test(char *);
char *crule_errstring(int);
int crule_eval(char *);
void crule_free(char **);
@@ -486,9 +489,11 @@ extern int b64_decode(char const *src, unsigned char *target, size_t targsize);
extern int Auth_FindType(char *type);
extern anAuthStruct *Auth_ConvertConf2AuthStruct(ConfigEntry *ce);
extern void Auth_DeleteAuthStruct(anAuthStruct *as);
extern int Auth_Check(aClient *cptr, anAuthStruct *as, char *para);
extern char *Auth_Make(short type, char *para);
extern void Auth_DeleteAuthStruct(anAuthStruct *as);
extern int Auth_Check(aClient *cptr, anAuthStruct *as, char *para);
extern char *Auth_Make(short type, char *para);
extern int Auth_CheckError(ConfigEntry *ce);
extern long xbase64dec(char *b64);
extern aClient *find_server_b64_or_real(char *name);
extern aClient *find_server_by_base64(char *b64);
@@ -519,7 +524,7 @@ extern u_long cres_mem(aClient *sptr, char *nick);
extern void flag_add(char *ch);
extern void flag_del(char ch);
extern void init_dynconf(void);
extern int init_conf2(char *filename);
extern int init_conf(char *filename, int rehash);
extern void validate_configuration(void);
extern void run_configuration(void);
extern aMotd *read_file(char *filename, aMotd **list);
@@ -532,5 +537,11 @@ extern void set_sock_opts(int fd, aClient *cptr);
extern void iCstrip(char *line);
extern time_t rfc2time(char *s);
extern char *rfctime(time_t t, char *buf);
extern void *MyMallocEx(size_t size);
#ifdef USE_SSL
char *ssl_get_cipher(SSL *ssl);
#endif
long config_checkval(char *value, unsigned short flags);
void config_status(char *format, ...);
#define EVENT_DRUGS BASE_VERSION
+19 -3
View File
@@ -210,7 +210,10 @@ extern Hooktype Hooktypes[MAXCUSTOMHOOKS];
extern Hook *global_i;
void Module_Init(void);
char *Module_Load(char *path, int load);
char *Module_Create(char *path);
void Init_all_testing_modules(void);
void Unload_all_loaded_modules(void);
void Unload_all_testing_modules(void);
int Module_Unload(char *name, int unload);
vFP Module_Sym(char *name);
vFP Module_SymX(char *name, Module **mptr);
@@ -248,7 +251,7 @@ void CommandDel(Command *command);
#define HOOKTYPE_LOCAL_NICKCHANGE 2
#define HOOKTYPE_LOCAL_CONNECT 3
#define HOOKTYPE_SCAN_INFO 5 /* Taken care of in scan.c */
#define HOOKTYPE_CONFIG_UNKNOWN 6
#define HOOKTYPE_CONFIGPOSTTEST 6
#define HOOKTYPE_REHASH 7
#define HOOKTYPE_PRE_LOCAL_CONNECT 8
#define HOOKTYPE_HTTPD_URL 9
@@ -257,12 +260,25 @@ void CommandDel(Command *command);
#define HOOKTYPE_SERVER_QUIT 12
#define HOOKTYPE_STATS 13
#define HOOKTYPE_LOCAL_JOIN 14
#define HOOKTYPE_CONFIGTEST 15
#define HOOKTYPE_CONFIGRUN 16
/* Module flags */
#define MODFLAG_NONE 0x0000
#define MODFLAG_LOADED 0x0001 /* (mod_load has been called and suceeded) */
#define MODFLAG_LOADED 0x0001 /* Fully loaded */
#define MODFLAG_TESTING 0x0002 /* Not yet initialized */
#define MODFLAG_INIT 0x0004 /* Initialized */
#define MODFLAG_DELAYED 0x0008 /* Delayed unload */
/* Module function return values */
#define MOD_SUCCESS 0
#define MOD_FAILED -1
#define MOD_DELAY 2
#define CONFIG_MAIN 1
#define CONFIG_SET 2
#define CONFIG_BAN 3
#define CONFIG_EXCEPT 4
#define CONFIG_DENY 5
#define CONFIG_ALLOW 6
#endif
+11 -4
View File
@@ -54,6 +54,7 @@
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#endif
#include "auth.h"
extern int sendanyways;
@@ -497,7 +498,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define OFLAG_HIDE 0x04000000 /* gets auto +x on oper up */
#define OFLAG_TKL 0x10000000 /* can use G:lines and shuns */
#define OFLAG_GZL 0x20000000 /* can use global Z:lines */
#define OFLAG_WMASTER 0x40000000
#define OFLAG_OVERRIDE 0x40000000 /* can use oper-override */
#define OFLAG_INVISIBLE 0x80000000
#define OFLAG_LOCAL (OFLAG_REHASH|OFLAG_HELPOP|OFLAG_GLOBOP|OFLAG_WALLOP|OFLAG_LOCOP|OFLAG_LROUTE|OFLAG_LKILL|OFLAG_KLINE|OFLAG_UNKLINE|OFLAG_LNOTICE)
#define OFLAG_GLOBAL (OFLAG_LOCAL|OFLAG_GROUTE|OFLAG_GKILL|OFLAG_GNOTICE)
@@ -506,6 +507,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define OFLAG_ADMIN_ (OFLAG_ADMIN | OFLAG_GLOBAL)
#define OFLAG_SADMIN_ (OFLAG_SADMIN | OFLAG_GLOBAL)
#define OPCanOverride(x) ((x)->oflag & OFLAG_OVERRIDE)
#define OPCanTKL(x) ((x)->oflag & OFLAG_TKL)
#define OPCanGZL(x) ((x)->oflag & OFLAG_GZL)
#define OPCanZline(x) ((x)->oflag & OFLAG_ZLINE)
@@ -732,6 +734,9 @@ extern short Usermode_highest;
#define CONNECT_AUTO 0x000004
#define CONNECT_QUARANTINE 0x000008
#define SSLFLAG_FAILIFNOCERT 0x1
#define SSLFLAG_VERIFYCERT 0x2
#define SSLFLAG_DONOTACCEPTSELFSIGNED 0x4
struct Client {
struct Client *next, *prev, *hnext;
anUser *user; /* ...defined, if this is a User */
@@ -959,13 +964,14 @@ struct _configitem_listen {
char *ip;
int port;
long options, clients;
aClient *listener;
};
struct _configitem_vhost {
ConfigItem *prev, *next;
ConfigFlag flag;
ConfigItem *from;
char *login, *virthost, *virtuser;
char *login, *virthost, *virtuser, *swhois;
anAuthStruct *auth;
};
@@ -1077,7 +1083,8 @@ struct _configitem_alias {
struct _configitem_alias_format {
ConfigItem *prev, *next;
ConfigFlag flag;
ConfigItem_alias *alias;
char *nick;
short type;
char *format, *parameters;
};
@@ -1360,7 +1367,7 @@ struct liststruct {
#ifdef CLEAN_COMPILE
#define TStime() (time(NULL) + TSoffset)
#else
#define TStime() (0, timeofday == 0 ? (timeofday = time(NULL) + TSoffset) : timeofday)
#define TStime() (timeofday == 0 ? (timeofday = time(NULL) + TSoffset) : timeofday)
#endif
/* Lifted somewhat from Undernet code --Rak */
+2 -5
View File
@@ -141,11 +141,6 @@ extern char OSName[256];
#ifdef INET6
# define AND16(x) ((x)[0]&(x)[1]&(x)[2]&(x)[3]&(x)[4]&(x)[5]&(x)[6]&(x)[7]&(x)[8]&(x)[9]&(x)[10]&(x)[11]&(x)[12]&(x)[13]&(x)[14]&(x)[15])
static unsigned char minus_one[] =
{ 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 0
};
# define WHOSTENTP(x) ((x)[0]|(x)[1]|(x)[2]|(x)[3]|(x)[4]|(x)[5]|(x)[6]|(x)[7]|(x)[8]|(x)[9]|(x)[10]|(x)[11]|(x)[12]|(x)[13]|(x)[14]|(x)[15])
# define AFINET AF_INET6
@@ -212,6 +207,7 @@ static const struct in6_addr in6addr_any = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
#define P_EWOULDBLOCK EWOULDBLOCK
#define P_EAGAIN EAGAIN
#define P_EINPROGRESS EINPROGRESS
#define P_EWORKING EINPROGRESS
#define P_EINTR EINTR
#define P_ETIMEDOUT ETIMEDOUT
#define P_ENOTSOCK ENOTSOCK
@@ -232,6 +228,7 @@ static const struct in6_addr in6addr_any = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
#define P_EWOULDBLOCK WSAEWOULDBLOCK
#define P_EAGAIN WSAEWOULDBLOCK
#define P_EINPROGRESS WSAEINPROGRESS
#define P_EWORKING WSAEWOULDBLOCK
#define P_EINTR WSAEINTR
#define P_ETIMEDOUT WSAETIMEDOUT
#define P_ENOTSOCK WSAENOTSOCK
+8 -3
View File
@@ -35,28 +35,33 @@
#include <pthread.h>
typedef pthread_t THREAD;
typedef pthread_mutex_t MUTEX;
#define IRCCreateThreadEx(thread, start, arg, id) TDebug(CreateThread); pthread_create(&thread, NULL, (void*)start, arg)
#define IRCCreateThread(thread, start, arg) TDebug(CreateThread); pthread_create(&thread, NULL, (void*)start, arg)
#define IRCMutexLock(mutex) TDebug(MutexLock); pthread_mutex_lock(&mutex)
#define IRCMutexTryLock(mutex) TDebug(MutexTryLock); pthread_mutex_trylock(&mutex);
#define IRCMutexUnlock(mutex) TDebug(MutexUnlcok); pthread_mutex_unlock(&mutex)
#define IRCCreateMutex(mutex) TDebug(CreateMutex); pthread_mutex_init(&mutex, NULL)
#define IRCMutexDestroy(mutex) TDebug(MutexDestroy); pthread_mutex_destroy(&mutex)
#define IRCJoinThread(thread,return) TDebug(JoinThread); pthread_join(thread, return)
#define IRCJoinThread(thread,ppvalue) TDebug(JoinThread); pthread_join(thread, (void **)ppvalue)
#define IRCExitThreadEx(value) TDebug(ExitThread); pthread_exit(value)
#define IRCExitThread(value) TDebug(ExitThread); pthread_exit(value)
#define IRCDetachThread(value) TDebug(DetachThread); pthread_detach(value);
#define IRCTerminateThread(thread, value) pthread_cancel(&thread)
#define IRCThreadSelf() pthread_self()
#define IRCThreadEqual(thread1, thread2) pthread_equal(thread1,thread2)
#else
typedef unsigned long THREAD;
typedef HANDLE THREAD;
typedef HANDLE MUTEX;
typedef unsigned (__stdcall *PTHREAD_START) (void *);
#define IRCCreateThreadEx(thread, start, arg, id) thread = (THREAD)_beginthreadex(NULL, 0, (PTHREAD_START)start, arg, 0, id)
#define IRCCreateThread(thread, start, arg) thread = _beginthread((void *)start, 0, arg)
#define IRCMutexLock(mutex) WaitForSingleObject(mutex, INFINITE)
#define IRCMutexTryLock(mutex) WaitForSingleObject(mutex, 0)
#define IRCMutexUnlock(mutex) ReleaseMutex(mutex)
#define IRCCreateMutex(mutex) mutex = CreateMutex(NULL, FALSE, NULL)
#define IRCMutexDestroy(mutex) CloseHandle(mutex)
#define IRCJoinThread(thread,return) WaitForSingleObject((HANDLE)thread, INFINITE); GetExitCodeThread((HANDLE)thread, (DWORD)return);
#define IRCJoinThread(thread,pdwRc) { WaitForSingleObject((HANDLE)thread, INFINITE); GetExitCodeThread((HANDLE)thread, pdwRc); CloseHandle((HANDLE)thread); }
#define IRCExitThreadEx(value) _endthreadex((unsigned int)value)
#define IRCExitThread(value) _endthread()
#define IRCTerminateThread(thread, value) TerminateThread((HANDLE)thread, value)
#define IRCThreadSelf() GetCurrentThread()
+3 -3
View File
@@ -24,13 +24,13 @@
/**/
#define COMPILEINFO DEBUGMODESET DEBUGSET
/*
* Version Unreal3.2-Selene
* Version Unreal3.2
*/
#define UnrealProtocol 2303
#define PATCH1 "3"
#define PATCH2 ".2"
#define PATCH3 "-Selene"
#define PATCH4 "[beta12]"
#define PATCH3 "-beta13"
#define PATCH4 ""
#define PATCH5 ""
#define PATCH6 ""
#define PATCH7 ""