From 12ec02261299938cfccb8cf7c73b72d24bf7c24d Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Fri, 28 Jun 2002 09:54:32 +0000 Subject: [PATCH] Remove oper privileges in DETACH command. --- CHANGES | 7 +++++++ TODO | 2 -- apps/silcd/command.c | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index c0b18f0a..5ed1f2d2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +Fri Jun 28 11:53:25 CEST 2002 Pekka Riikonen + + * 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 * Buffer overflow with CUMODE command's mode->mode character diff --git a/TODO b/TODO index 087c3635..568becd3 100644 --- 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 diff --git a/apps/silcd/command.c b/apps/silcd/command.c index 93e94e80..5d6b3cda 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -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; -- 2.24.0