projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove oper privileges in DETACH command.
[silc.git]
/
apps
/
silcd
/
command.c
diff --git
a/apps/silcd/command.c
b/apps/silcd/command.c
index 93e94e80bca35c2c41f56685ad9820e0ba9c95c6..5d6b3cda0a86012b518213d379e88fd35f89a01b 100644
(file)
--- 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);
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;
/* Send the user mode notify to notify that client is detached */
client->mode |= SILC_UMODE_DETACHED;
client->data.status &= ~SILC_IDLIST_STATUS_RESUMED;