incorporate patches from Dragos Ruiu as a FLAVOR which allow a SILC

operator to give themselves operator status on any channel.
This commit is contained in:
jolan 2003-08-19 03:52:27 +00:00
parent fd8261605f
commit cb167113da
5 changed files with 93 additions and 13 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.7 2003/07/30 00:26:26 brad Exp $ # $OpenBSD: Makefile,v 1.8 2003/08/19 03:52:27 jolan Exp $
.if ${MACHINE_ARCH} == "powerpc" .if ${MACHINE_ARCH} == "powerpc"
BROKEN= "config file parser bug on ${MACHINE_ARCH}" BROKEN= "config file parser bug on ${MACHINE_ARCH}"
@ -31,10 +31,21 @@ MASTER_SITES= http://ftp.silcnet.org/server/sources/ \
MODULES= iconv MODULES= iconv
# XXX workaround gcc bugs on sparc64 # XXX workaround gcc bugs on sparc64
.if ${MACHINE_ARCH:Msparc64} .if ${MACHINE_ARCH} == "sparc64"
PATCH_LIST= gcc-* patch-* PATCH_LIST= gcc-* patch-*
.endif .endif
FLAVORS= operops
FLAVOR?=
.if ${FLAVOR:L:Moperops}
.if ${MACHINE_ARCH} == "sparc64"
PATCH_LIST= gcc-* operops-* patch-*
.else
PATCH_LIST= operops-* patch-*
.endif
.endif
CONFIGURE_STYLE=autoconf CONFIGURE_STYLE=autoconf
AUTOCONF_VERSION=2.54 AUTOCONF_VERSION=2.54
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC} ${WRKSRC}/lib/silcmath/mpi MODGNU_CONFIG_GUESS_DIRS=${WRKSRC} ${WRKSRC}/lib/silcmath/mpi

View File

@ -0,0 +1,34 @@
$OpenBSD: operops-patch-silcd_command_c,v 1.1 2003/08/19 03:52:27 jolan Exp $
--- silcd/command.c.orig 2003-03-17 11:01:53.000000000 -0600
+++ silcd/command.c 2003-08-18 17:45:58.000000000 -0500
@@ -3154,6 +3154,8 @@ SILC_SERVER_CMD_FUNC(cumode)
}
if (target_client != client &&
+ !(client->mode & SILC_UMODE_SERVER_OPERATOR) &&
+ !(client->mode & SILC_UMODE_ROUTER_OPERATOR) &&
!(sender_mask & SILC_CHANNEL_UMODE_CHANFO) &&
!(sender_mask & SILC_CHANNEL_UMODE_CHANOP)) {
silc_server_command_send_status_reply(cmd, SILC_COMMAND_CUMODE,
@@ -3261,7 +3263,9 @@ SILC_SERVER_CMD_FUNC(cumode)
/* Promote to operator */
if (!(chl->mode & SILC_CHANNEL_UMODE_CHANOP)) {
if (!(sender_mask & SILC_CHANNEL_UMODE_CHANOP) &&
- !(sender_mask & SILC_CHANNEL_UMODE_CHANFO)) {
+ !(sender_mask & SILC_CHANNEL_UMODE_CHANFO) &&
+ !(client->mode & SILC_UMODE_SERVER_OPERATOR) &&
+ !(client->mode & SILC_UMODE_ROUTER_OPERATOR)) {
silc_server_command_send_status_reply(cmd, SILC_COMMAND_CUMODE,
SILC_STATUS_ERR_NO_CHANNEL_PRIV,
0);
@@ -3274,7 +3278,9 @@ SILC_SERVER_CMD_FUNC(cumode)
} else {
if (chl->mode & SILC_CHANNEL_UMODE_CHANOP) {
if (!(sender_mask & SILC_CHANNEL_UMODE_CHANOP) &&
- !(sender_mask & SILC_CHANNEL_UMODE_CHANFO)) {
+ !(sender_mask & SILC_CHANNEL_UMODE_CHANFO) &&
+ !(client->mode & SILC_UMODE_SERVER_OPERATOR) &&
+ !(client->mode & SILC_UMODE_ROUTER_OPERATOR)) {
silc_server_command_send_status_reply(cmd, SILC_COMMAND_CUMODE,
SILC_STATUS_ERR_NO_CHANNEL_PRIV,
0);

View File

@ -0,0 +1,31 @@
$OpenBSD: operops-patch-silcd_silcd_c,v 1.1 2003/08/19 03:52:27 jolan Exp $
--- silcd/silcd.c.orig 2003-08-18 17:47:02.000000000 -0500
+++ silcd/silcd.c 2003-08-18 17:47:29.000000000 -0500
@@ -255,6 +255,14 @@ SILC_TASK_CALLBACK(stop_server)
silc_schedule_stop(silcd->schedule);
}
+extern bool silc_debug;
+SILC_TASK_CALLBACK(toggle_debug)
+{
+ if(silc_debug)
+ silc_debug = FALSE;
+ else silc_debug = TRUE;
+}
+
/* Dump server statistics into a file into /tmp directory */
SILC_TASK_CALLBACK(dump_stats)
@@ -728,10 +736,12 @@ int main(int argc, char **argv)
sigaction(SIGTERM, &sa, NULL);
sigaction(SIGINT, &sa, NULL);
sigaction(SIGUSR1, &sa, NULL);
+ sigaction(SIGUSR2, &sa, NULL);
silc_schedule_signal_register(silcd->schedule, SIGHUP, got_hup, NULL);
silc_schedule_signal_register(silcd->schedule, SIGTERM, stop_server, NULL);
silc_schedule_signal_register(silcd->schedule, SIGINT, stop_server, NULL);
silc_schedule_signal_register(silcd->schedule, SIGUSR1, dump_stats, NULL);
+ silc_schedule_signal_register(silcd->schedule, SIGUSR2, toggle_debug, NULL);
if (!foreground) {
/* Before running the server, fork to background. */

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-configure_in,v 1.1 2003/05/04 04:02:53 brad Exp $ $OpenBSD: patch-configure_in,v 1.2 2003/08/19 03:52:27 jolan Exp $
--- configure.in.orig Mon Mar 17 11:44:33 2003 --- configure.in.orig 2003-03-17 11:44:33.000000000 -0600
+++ configure.in Fri Apr 11 16:18:53 2003 +++ configure.in 2003-08-18 17:39:59.000000000 -0500
@@ -40,7 +40,6 @@ AM_INIT_AUTOMAKE(silc-server, 0.9.13) @@ -40,7 +40,6 @@ AM_INIT_AUTOMAKE(silc-server, 0.9.13)
AC_PREREQ(2.52) AC_PREREQ(2.52)
AC_CONFIG_HEADERS(includes/silcdefs.h) AC_CONFIG_HEADERS(includes/silcdefs.h)
@ -9,11 +9,10 @@ $OpenBSD: patch-configure_in,v 1.1 2003/05/04 04:02:53 brad Exp $
AC_PROG_CC AC_PROG_CC
AC_C_INLINE AC_C_INLINE
AC_C_CONST AC_C_CONST
@@ -339,33 +338,6 @@ AC_DEFUN(SILC_ADD_CFLAGS, @@ -340,33 +339,6 @@ AC_DEFUN(SILC_ADD_CFLAGS,
$2])
unset tmp_CFLAGS unset tmp_CFLAGS
]) ])
-
-if test "$GCC"; then -if test "$GCC"; then
- # GCC specific options - # GCC specific options
- if test "x$summary_debug" = "xyes"; then - if test "x$summary_debug" = "xyes"; then
@ -40,6 +39,7 @@ $OpenBSD: patch-configure_in,v 1.1 2003/05/04 04:02:53 brad Exp $
- fi - fi
-fi -fi
- -
-
## ##
## Installation ## Installation
##

View File

@ -24,4 +24,8 @@ encrypted in the SILC network. Each connection has their own session keys,
all channels have channel specific keys, and all private messages can be all channels have channel specific keys, and all private messages can be
secured with private message specific keys. secured with private message specific keys.
WWW: ${HOMEPAGE} FLAVORs:
operops - Patches in the ability for a SILC operator to give
themselves operator status on any channel. Please
note that SILC explicitly prohibits this.