1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-08 13:43:13 +02:00

+- Made more openssl binary detection using 'which'

+- Added message when trying to join a +z channel
+- New segmentation fault code by Kanzen_Greiver
This commit is contained in:
stskeeps
2000-12-09 15:12:23 +00:00
parent 0a58f33c27
commit ba924cb7bc
6 changed files with 41 additions and 42 deletions
+3
View File
@@ -247,3 +247,6 @@
- Fixed restart bug, reported by RaYmAn
- Fix-fixed " Fixed /whois to not show idle times of global opers to
anyone" patch
- Fixed a recently found exploit involving reverse DNS (fix from bahamut)
- Made more openssl binary detection using 'which'
- Added message when trying to join a +z channel
+3 -25
View File
@@ -545,37 +545,15 @@ if [ -r /usr/include/openssl/ssl.h ] ; then
elif [ -r /usr/local/ssl/bin/openssl ] ; then
OPENSSLPATH=/usr/local/ssl/bin/openssl
echo $OPENSSLPATH
else
echo "Couldn't find it! (bad)"
OPENSSLPATH=/bin/false
OPENSSLPATH=/bin/false
fi
else
if [ -r /usr/local/ssl/include/openssl/ssl.h ] ; then
echo $n "...Looking where you got the openssl binary...$c"
if [ -r /bin/openssl ] ; then
OPENSSLPATH=/bin/openssl
echo $OPENSSLPATH
elif [ -r /usr/bin/openssl ] ; then
OPENSSLPATH=/usr/bin/openssl
echo $OPENSSLPATH
elif [ -r /usr/sbin/openssl ] ; then
OPENSSLPATH=/usr/sbin/openssl
echo $OPENSSLPATH
elif [ -r /usr/local/bin/openssl ] ; then
OPENSSLPATH=/usr/local/bin/openssl
echo $OPENSSLPATH
elif [ -r /usr/local/ssl/bin/openssl ] ; then
OPENSSLPATH=/usr/local/ssl/bin/openssl
echo $OPENSSLPATH
elif [ -r `which openssl` ] ; then
OPENSSLPATH=`which openssl`
echo $OPENSSLPATH
else
echo "Couldn't find it! (bad)"
OPENSSLPATH=/bin/false
OPENSSLPATH=/bin/false
fi
fi
fi
#
# to b or not to b
+2
View File
@@ -2267,6 +2267,8 @@ static int can_join(cptr, sptr, chptr, key, link, parv)
if ((chptr->mode.mode & MODE_ONLYSECURE) &&
!(sptr->umodes & UMODE_SECURE))
{
sendto_one(sptr, ":%s NOTICE %s :*** Cannot join: %s is a Secure-only channel (+z)",
me.name, sptr->name, chptr->chname);
return (ERR_BANNEDFROMCHAN);
}
if ((chptr->mode.mode & MODE_OPERONLY) && !IsOper(sptr))
+31 -10
View File
@@ -258,22 +258,40 @@ VOIDSIG s_restart()
}
}
VOIDSIG s_segv()
{
#ifdef POSIX_SIGNALS
struct sigaction act;
#endif
int i;
FILE *log;
int p;
static TS segv_last = (TS)0;
#ifdef RENAME_CORE
char corename[512];
#else
# define corename "core"
#endif
if (!segv_last) {
sendto_ops("Recieved first Segfault, doing re-enter test");
segv_last = TStime();
return;
}
if ((TStime() - segv_last) > 5) {
#ifdef USE_SYSLOG
(void)syslog(LOG_WARNING, "Possible fake segfault");
#endif
segv_last = TStime();
return;
}
#ifdef POSIX_SIGNALS
act.sa_flags = 0;
act.sa_handler = SIG_DFL;
(void)sigemptyset(&act.sa_mask);
(void)sigaddset(&act.sa_mask, SIGSEGV);
(void)sigaction(SIGSEGV,&act,NULL);
#else
(void)signal(SIGSEGV,SIG_DFL);
#endif
#ifdef USE_SYSLOG
@@ -286,6 +304,7 @@ VOIDSIG s_segv()
sendto_serv_butone(&me,
":%s GLOBOPS :AIEEE!!! Server Terminating: Segmention fault (buf: %s)",
me.name, backupbuf);
sendto_all_butone(NULL, &me, "NOTICE ALL :SEGFAULT! I'm Meeeeellllting, what a world!");
log = fopen(lPATH, "a");
if (log)
{
@@ -297,14 +316,12 @@ VOIDSIG s_segv()
#if !defined(_WIN32) && !defined(_AMIGA)
p = getpid();
if (fork() > 0)
{
kill(p, 3);
kill(p, 9);
}
if (fork()) { return; }
write_pidfile();
#ifdef RENAME_CORE
(void)ircsprintf(corename, "core.%d", p);
(void)rename("core", corename);
#endif
sendto_realops
("Dumped core to %s - please read Unreal.nfo on what to do!",
corename);
@@ -312,15 +329,19 @@ VOIDSIG s_segv()
flush_connections(me.fd);
#ifndef _WIN32
for (i = 3; i < MAXCONNECTIONS; i++)
for (i = 3; i < MAXCONNECTIONS; i++) {
(void)close(i);
}
#else
for (i = 0; i < highest_fd; i++)
for (i = 0; i < highest_fd; i++) {
if (closesocket(i) == -1)
close(i);
}
#endif
kill(p,SIGQUIT);
exit(-1);
}
void server_reboot(mesg)
char *mesg;
{
+1 -1
View File
@@ -111,7 +111,7 @@ int ssl_handshake(aClient *cptr)
err = SSL_accept((SSL *) cptr->ssl);
if ((err) == -1)
{
sendto_umode(UMODE_JUNK, "Lost connection to %s:Error in SSL_accept()",
sendto_umode(UMODE_JUNK, "Lost connection to %s:Error in SSL_accept()",
get_client_name(cptr, TRUE));
return 0;
}
+1 -6
View File
@@ -184,12 +184,7 @@ char *unrealcredits[] =
"zero9000, #wIRCd@DALnet, comstud, dog3, Dianora, Isomer, and others who arent listed here:)",
"",
"------------------------------------------------------",
"Unreal 3.0, 3.1, 3.1.1 and up is dedicated to Morrigana",
"- Julie F., a girl who have helped me through anything in my life, hugging",
"me at the right times, a definate dedication. Thanks for the kisses",
"long phonetalks, waste of my mobilephone ;), crying together",
"and making life go on for us both. I will never forget you",
"never leave you, love ya forever. ",
"Unreal 3.0, 3.1, 3.1.1 and up is dedicated to Morrigan",
"------------------------------------------------------",
"This IRCd is dedicated to the love that has always been",
"and will always be there - Thanks to the girls & friends that kept me up",