add separate priv (oper:message) for walking over CALLERID (umode +g) (#152)

This commit is contained in:
jess 2021-04-26 17:24:36 +01:00 committed by GitHub
parent 4cac091255
commit 64d5cff464
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View file

@ -231,8 +231,8 @@ auth {
* means they must be defined before operator {}.
*/
privset "local_op" {
privs = oper:general, oper:privs, oper:testline, oper:kill, oper:operwall, usermode:servnotice,
auspex:oper, auspex:hostname, auspex:umodes, auspex:cmodes;
privs = oper:general, oper:privs, oper:testline, oper:kill, oper:operwall, oper:message,
usermode:servnotice, auspex:oper, auspex:hostname, auspex:umodes, auspex:cmodes;
};
privset "server_bot" {

View file

@ -458,6 +458,7 @@ privset "local_op" {
* oper:wallops: allows sending wallops messages
* oper:grant: allows using the GRANT command
* usermode:servnotice: allows setting +s
* oper:message: allows opers to bypass CALLERID (usermode +g)
*
* Privileges provided by extensions include:
*
@ -467,8 +468,8 @@ privset "local_op" {
* confers the benefits of chmode +M (operpeace) (from extensions/chm_operpeace)
* usermode:helpops allows setting +h (from extensions/helpops)
*/
privs = oper:general, oper:privs, oper:testline, oper:kill, oper:operwall, usermode:servnotice,
auspex:oper, auspex:hostname, auspex:umodes, auspex:cmodes;
privs = oper:general, oper:privs, oper:testline, oper:kill, oper:operwall, oper:message,
usermode:servnotice, auspex:oper, auspex:hostname, auspex:umodes, auspex:cmodes;
};
privset "server_bot" {

View file

@ -103,7 +103,7 @@ allow_message(struct Client *source_p, struct Client *target_p)
return true;
/* XXX: controversial? allow opers to send through +g */
if (IsOperGeneral(source_p))
if (HasPrivilege(source_p, "oper:message"))
return true;
if (accept_message(source_p, target_p))