Remove oper privileges in DETACH command.
authorPekka Riikonen <priikone@silcnet.org>
Fri, 28 Jun 2002 09:54:32 +0000 (09:54 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 28 Jun 2002 09:54:32 +0000 (09:54 +0000)
CHANGES
TODO
apps/silcd/command.c

diff --git a/CHANGES b/CHANGES
index c0b18f0a43a028016ae85a4f6689334dcb0270f0..5ed1f2d2bc8cfca7d12ff2072e12277db352ebbe 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,10 @@
+Fri Jun 28 11:53:25 CEST 2002 Pekka Riikonen <priikone@silcnet.org>
+
+       * Remove server/router operator privileges in DETACH command,
+         since it's possible to resume to server where these
+         privileges would not be allowed for the client.  Affected
+         file silcd/command.c.
+
 Thu Jun 27 20:07:27 EEST 2002 Pekka Riikonen <priikone@silcnet.org>
 
        * Buffer overflow with CUMODE command's mode->mode character
diff --git a/TODO b/TODO
index 087c363545d2c28563f621eb886864a928eee87b..568becd36d45972fdd6dc507e803bcdf55f3e843 100644 (file)
--- a/TODO
+++ b/TODO
@@ -30,8 +30,6 @@ TODO/bugs In SILC Server
    the core library, client and server.  Maybe implementations of
    RFC 2425 and RFC 2426 to make it complete.
 
- o Remove OPER and SILCOPER rights in DETACH.
-
  o Backup router related issues:
 
        o Add special handling in router and server for "connection
index 93e94e80bca35c2c41f56685ad9820e0ba9c95c6..5d6b3cda0a86012b518213d379e88fd35f89a01b 100644 (file)
@@ -5010,6 +5010,11 @@ SILC_SERVER_CMD_FUNC(detach)
 
   SILC_SERVER_COMMAND_CHECK(SILC_COMMAND_DETACH, cmd, 0, 0);
 
+  /* Remove operator privileges, since the client may resume in some
+     other server which to it does not have operator privileges. */
+  client->mode &= ~(SILC_UMODE_SERVER_OPERATOR |
+                   SILC_UMODE_ROUTER_OPERATOR);
+
   /* Send the user mode notify to notify that client is detached */
   client->mode |= SILC_UMODE_DETACHED;
   client->data.status &= ~SILC_IDLIST_STATUS_RESUMED;