diff --git a/CHANGELOG.md b/CHANGELOG.md index f4582d722..d443e9181 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ SPDX-License-Identifier: GPL-3.0-or-later - core: add condition on connected relay api clients in default value of option weechat.look.hotlist_add_conditions - core: add `/mute` in default command for key `Alt`+`=` (toggle filters) +### Added + +- relay: add option relay.network.unix_socket_permissions ([#2317](https://github.com/weechat/weechat/issues/2317)) + ## Version 4.9.0 (2026-03-29) ### Changed diff --git a/po/cs.po b/po/cs.po index 46c8f9117..8521b0d0b 100644 --- a/po/cs.po +++ b/po/cs.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2026-04-28 21:16+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: Czech \n" @@ -15142,6 +15142,11 @@ msgid "" "1 are recommended values)" msgstr "" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + msgid "" "POSIX extended regular expression with origins allowed in websockets (case-" "insensitive, use \"(?-i)\" at beginning to make it case-sensitive), example: " @@ -15390,6 +15395,10 @@ msgstr "%s%s: nemohu se \"navázat\" na port %d (%s): chyba %d %s" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s%s: nemohu se \"navázat\" na port %d (%s): chyba %d %s" +#, fuzzy, c-format +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "%s%s: nemohu \"naslouchat\" na portu %d (%s): chyba %d %s" + #, fuzzy, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s%s: nemohu \"naslouchat\" na portu %d (%s): chyba %d %s" diff --git a/po/de.po b/po/de.po index 31fdbd1ee..4a6eeae8c 100644 --- a/po/de.po +++ b/po/de.po @@ -29,7 +29,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2026-05-06 15:58+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German - Germany \n" @@ -1178,9 +1178,6 @@ msgstr "" "Standardmäßig wird der Abwesenheitsstatus durch die IRC-Erweiterung nur " "lokal angezeigt (siehe /help irc.look.display_away)." -#| msgid "" -#| " - ${color:name}: the color (see \"Plugin API reference\", function " -#| "\"color\")" msgid "" "This command can be caught by other plugins and scripts (see \"Plugin API " "reference\", function \"hook_command_run\")." @@ -16524,6 +16521,11 @@ msgstr "" "danach, ...; umso höher die genutzte Zahl umso unsicherer das Verfahren (0 " "oder 1 sind empfohlene Werte)" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + msgid "" "POSIX extended regular expression with origins allowed in websockets (case-" "insensitive, use \"(?-i)\" at beginning to make it case-sensitive), example: " @@ -16791,6 +16793,11 @@ msgstr "%s%s: \"bind\" an Pfad %s (%s) nicht möglich: Fehler %d %s" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s%s: \"bind\" an Port %d (%s) nicht möglich: Fehler %d %s" +#, fuzzy, c-format +#| msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "%s%s: kann nicht an Pfad %s (%s) lauschen: Fehler %d %s" + #, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s%s: kann nicht an Pfad %s (%s) lauschen: Fehler %d %s" diff --git a/po/es.po b/po/es.po index 4f8ebc141..fde3a6b30 100644 --- a/po/es.po +++ b/po/es.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2026-03-12 20:24+0100\n" "Last-Translator: Santiago Forero \n" "Language-Team: Spanish - Spain \n" @@ -15448,6 +15448,11 @@ msgid "" "1 are recommended values)" msgstr "" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + # why is case insensitive important? ips use numbers and urls are case insensible. #, fuzzy msgid "" @@ -15685,6 +15690,10 @@ msgstr "%s%s: error con \"bind\" en el puerto %d (%s)" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s%s: error con \"bind\" en el puerto %d (%s)" +#, fuzzy, c-format +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "%s%s: no se puede aceptar el cliente en el puerto %d (%s)" + #, fuzzy, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s%s: no se puede aceptar el cliente en el puerto %d (%s)" diff --git a/po/fr.po b/po/fr.po index c1537afb8..1a6312efd 100644 --- a/po/fr.po +++ b/po/fr.po @@ -23,8 +23,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" -"PO-Revision-Date: 2026-05-04 18:46+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" +"PO-Revision-Date: 2026-05-10 19:15+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: French - France \n" "Language: fr\n" @@ -16216,6 +16216,13 @@ msgstr "" "accepter deux mots de passe avant, le courant et deux après, ... ; un nombre " "élevé réduit le niveau de sécurité (0 ou 1 sont les valeurs recommandées)" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" +"permissions pour le socket Unix, sous forme de valeur octale (voir man " +"chmod) ; doit être un nombre avec 3 chiffres, chacun compris entre 0 et 7" + msgid "" "POSIX extended regular expression with origins allowed in websockets (case-" "insensitive, use \"(?-i)\" at beginning to make it case-sensitive), example: " @@ -16480,6 +16487,12 @@ msgstr "%s%s : \"bind\" impossible sur le chemin %s (%s) : erreur %d %s" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s%s : \"bind\" impossible sur le port %d (%s) : erreur %d %s" +#, c-format +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "" +"%s%s : attention : échec de changement des permissions sur le chemin %s " +"(%s) : erreur %d %s" + #, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s%s : \"listen\" impossible sur le chemin %s (%s) : erreur %d %s" diff --git a/po/hu.po b/po/hu.po index c170c5452..3293cf24c 100644 --- a/po/hu.po +++ b/po/hu.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: Hungarian \n" @@ -14448,6 +14448,11 @@ msgid "" "1 are recommended values)" msgstr "" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + msgid "" "POSIX extended regular expression with origins allowed in websockets (case-" "insensitive, use \"(?-i)\" at beginning to make it case-sensitive), example: " @@ -14670,6 +14675,10 @@ msgstr "%s nem sikerült a csatornát létrehozni\n" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s nem sikerült a csatornát létrehozni\n" +#, fuzzy, c-format +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "%s nem sikerült a csatornát létrehozni\n" + #, fuzzy, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s nem sikerült a csatornát létrehozni\n" diff --git a/po/it.po b/po/it.po index 461550e88..ac4da92ad 100644 --- a/po/it.po +++ b/po/it.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2026-04-28 21:17+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: Italian \n" @@ -15502,6 +15502,11 @@ msgid "" "1 are recommended values)" msgstr "" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + #, fuzzy msgid "" "POSIX extended regular expression with origins allowed in websockets (case-" @@ -15765,6 +15770,10 @@ msgstr "%s%s: \"bind\" impossibile sulla porta %d (%s): errore %d %s" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s%s: \"bind\" impossibile sulla porta %d (%s): errore %d %s" +#, fuzzy, c-format +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "%s%s: \"listen\" impossibile sulla porta %d (%s): errore %d %s" + #, fuzzy, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s%s: \"listen\" impossibile sulla porta %d (%s): errore %d %s" diff --git a/po/ja.po b/po/ja.po index 571677627..16ec01742 100644 --- a/po/ja.po +++ b/po/ja.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2026-04-28 21:20+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -16022,6 +16022,11 @@ msgstr "" "のパスワードを考慮、...; この値を大きくするとセキュリティレベルが低下します " "(0 または 1 を推奨します)" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + #, fuzzy #| msgid "" #| "POSIX extended regular expression with origins allowed in websockets " @@ -16305,6 +16310,11 @@ msgstr "%s%s: パス %s (%s) に \"bind\" できません: エラー %d %s" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s%s: ポート %d (%s) に \"bind\" できません: エラー %d %s" +#, fuzzy, c-format +#| msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "%s%s: パス %s (%s) ではリッスンできません: エラー %d %s" + #, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s%s: パス %s (%s) ではリッスンできません: エラー %d %s" diff --git a/po/pl.po b/po/pl.po index 6de2e9731..d8afb2ac1 100644 --- a/po/pl.po +++ b/po/pl.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2026-04-28 21:21+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: Polish \n" @@ -15783,6 +15783,11 @@ msgstr "" "hasła, ...; wysoka liczba obniża poziom bezpieczeństwa (0 lub 1 to zalecane " "wartości)" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + msgid "" "POSIX extended regular expression with origins allowed in websockets (case-" "insensitive, use \"(?-i)\" at beginning to make it case-sensitive), example: " @@ -16050,6 +16055,11 @@ msgstr "%s%s: nie można wykonać \"bind\" na ścieżce %s (%s): błąd %d %s" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s%s: nie można wykonać \"bind\" na porcie %d (%s): błąd %d %s" +#, fuzzy, c-format +#| msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "%s%s: nie można wykonać \"listen\" na ścieżce %s (%s): błąd %d %s" + #, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s%s: nie można wykonać \"listen\" na ścieżce %s (%s): błąd %d %s" diff --git a/po/pt.po b/po/pt.po index fe249041f..8e561a52d 100644 --- a/po/pt.po +++ b/po/pt.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2026-04-28 21:18+0200\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese - Portugal \n" @@ -15893,6 +15893,11 @@ msgid "" "1 are recommended values)" msgstr "" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + #, fuzzy msgid "" "POSIX extended regular expression with origins allowed in websockets (case-" @@ -16165,6 +16170,10 @@ msgstr "%s%s: não é possível efetuar \"bind\" da porta %d (%s): erro %d %s" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s%s: não é possível efetuar \"bind\" da porta %d (%s): erro %d %s" +#, fuzzy, c-format +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "%s%s: não foi possível efetuar \"listen\" da porta %d (%s): erro %d %s" + #, fuzzy, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s%s: não foi possível efetuar \"listen\" da porta %d (%s): erro %d %s" diff --git a/po/pt_BR.po b/po/pt_BR.po index 3bdf0bb8e..c51d176eb 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -46,7 +46,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2026-03-12 20:19+0100\n" "Last-Translator: Érico Nogueira \n" "Language-Team: Portuguese - Brazil \n" @@ -14937,6 +14937,11 @@ msgid "" "1 are recommended values)" msgstr "" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + #, fuzzy msgid "" "POSIX extended regular expression with origins allowed in websockets (case-" @@ -15175,6 +15180,10 @@ msgstr "%s%s: erro ao associar (\"bind\") na porta %d (%s.%s)" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s%s: erro ao associar (\"bind\") na porta %d (%s.%s)" +#, fuzzy, c-format +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "%s%s: não foi possível aceitar o cliente na porta %d (%s.%s)" + #, fuzzy, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s%s: não foi possível aceitar o cliente na porta %d (%s.%s)" diff --git a/po/ru.po b/po/ru.po index 29d90b7fd..27337c865 100644 --- a/po/ru.po +++ b/po/ru.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: Russian \n" @@ -14499,6 +14499,11 @@ msgid "" "1 are recommended values)" msgstr "" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + msgid "" "POSIX extended regular expression with origins allowed in websockets (case-" "insensitive, use \"(?-i)\" at beginning to make it case-sensitive), example: " @@ -14720,6 +14725,10 @@ msgstr "%s невозможно создать сокет\n" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s невозможно создать сокет\n" +#, fuzzy, c-format +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "%s невозможно создать сокет\n" + #, fuzzy, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s невозможно создать сокет\n" diff --git a/po/sr.po b/po/sr.po index 0beedda8b..2fa034807 100644 --- a/po/sr.po +++ b/po/sr.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2026-04-28 21:21+0200\n" "Last-Translator: Ivan Pešić \n" "Language-Team: Serbian \n" @@ -15771,6 +15771,11 @@ msgstr "" "након, ...; велики број умањује ниво безбедности (препоручене вредности су 0 " "или 1)" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + msgid "" "POSIX extended regular expression with origins allowed in websockets (case-" "insensitive, use \"(?-i)\" at beginning to make it case-sensitive), example: " @@ -16033,6 +16038,11 @@ msgstr "%s%s: „bind” не може да се изврши на путању msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s%s: „bind” не може да се изврши на порт %d (%s): грешка %d %s" +#, fuzzy, c-format +#| msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "%s%s: „listen” не може да се покрене на путањи %s (%s): грешка%d %s" + #, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s%s: „listen” не може да се покрене на путањи %s (%s): грешка%d %s" diff --git a/po/tr.po b/po/tr.po index feee8d83c..e680d7aec 100644 --- a/po/tr.po +++ b/po/tr.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2026-04-28 21:22+0200\n" "Last-Translator: Emir SARI \n" "Language-Team: Turkish \n" @@ -16122,6 +16122,11 @@ msgstr "" "parola, geçerli parola ve sonrasında iki parola kabul et, ..., yüksek sayı " "güvenlik düzeyini düşürür (0 ve 1 önerilir)" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + #, fuzzy #| msgid "" #| "POSIX extended regular expression with origins allowed in websockets " @@ -16404,6 +16409,11 @@ msgstr "%s%s: %s yolunda \"bağlama\" yapılamıyor (%s): hata %d %s" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "%s%s: %d kapısında \"bağlama\" yapılamıyor (%s): hata %d %s" +#, fuzzy, c-format +#| msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "%s%s: %s yolunda \"dinleme\" yapılamıyor (%s): error %d %s" + #, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "%s%s: %s yolunda \"dinleme\" yapılamıyor (%s): error %d %s" diff --git a/po/weechat.pot b/po/weechat.pot index 8f2f44cff..da2163437 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-05-04 18:45+0200\n" +"POT-Creation-Date: 2026-05-10 19:14+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -13218,6 +13218,11 @@ msgid "" "1 are recommended values)" msgstr "" +msgid "" +"permissions for the Unix socket, as octal value (see man chmod); it must be " +"a number with 3 digits, each between 0 and 7" +msgstr "" + msgid "" "POSIX extended regular expression with origins allowed in websockets (case-" "insensitive, use \"(?-i)\" at beginning to make it case-sensitive), example: " @@ -13428,6 +13433,10 @@ msgstr "" msgid "%s%s: cannot \"bind\" on port %d (%s): error %d %s" msgstr "" +#, c-format +msgid "%s%s: warning: failed to set permissions on path %s (%s): error %d %s" +msgstr "" + #, c-format msgid "%s%s: cannot \"listen\" on path %s (%s): error %d %s" msgstr "" diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c index 49ba87ed1..592e955aa 100644 --- a/src/plugins/relay/relay-config.c +++ b/src/plugins/relay/relay-config.c @@ -93,6 +93,7 @@ struct t_config_option *relay_config_network_tls_cert_key = NULL; struct t_config_option *relay_config_network_tls_priorities = NULL; struct t_config_option *relay_config_network_totp_secret = NULL; struct t_config_option *relay_config_network_totp_window = NULL; +struct t_config_option *relay_config_network_unix_socket_permissions = NULL; struct t_config_option *relay_config_network_websocket_allowed_origins = NULL; struct t_config_option *relay_config_network_websocket_permessage_deflate = NULL; @@ -481,6 +482,27 @@ relay_config_change_network_tls_priorities (const void *pointer, void *data, } } +/* + * Check if option "relay.network.unix_socket_permissions" is valid. + * + * Return: + * 1: value is valid + * 0: value is not valid + */ + +int +relay_config_check_network_unix_socket_permissions (const void *pointer, void *data, + struct t_config_option *option, + const char *value) +{ + /* make C compiler happy */ + (void) pointer; + (void) data; + (void) option; + + return value && (strlen (value) == 3) && weechat_util_parse_long (value, 8, NULL); +} + /* * Callback for changes on option "relay.network.websocket_allowed_origins". */ @@ -1757,6 +1779,15 @@ relay_config_init (void) "(0 or 1 are recommended values)"), NULL, 0, 256, "0", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + relay_config_network_unix_socket_permissions = weechat_config_new_option ( + relay_config_file, relay_config_section_network, + "unix_socket_permissions", "string", + N_("permissions for the Unix socket, as octal value (see man chmod); " + "it must be a number with 3 digits, each between 0 and 7"), + NULL, 0, 0, "700", NULL, 0, + &relay_config_check_network_unix_socket_permissions, NULL, NULL, + NULL, NULL, NULL, + NULL, NULL, NULL); relay_config_network_websocket_allowed_origins = weechat_config_new_option ( relay_config_file, relay_config_section_network, "websocket_allowed_origins", "string", diff --git a/src/plugins/relay/relay-config.h b/src/plugins/relay/relay-config.h index 687126627..349155116 100644 --- a/src/plugins/relay/relay-config.h +++ b/src/plugins/relay/relay-config.h @@ -62,6 +62,7 @@ extern struct t_config_option *relay_config_network_tls_cert_key; extern struct t_config_option *relay_config_network_tls_priorities; extern struct t_config_option *relay_config_network_totp_secret; extern struct t_config_option *relay_config_network_totp_window; +extern struct t_config_option *relay_config_network_unix_socket_permissions; extern struct t_config_option *relay_config_network_websocket_allowed_origins; extern struct t_config_option *relay_config_network_websocket_permessage_deflate; diff --git a/src/plugins/relay/relay-server.c b/src/plugins/relay/relay-server.c index 32542eabd..56c484d13 100644 --- a/src/plugins/relay/relay-server.c +++ b/src/plugins/relay/relay-server.c @@ -498,6 +498,7 @@ int relay_server_create_socket (struct t_relay_server *server) { int domain, set, max_clients, addr_size, rc; + long unix_socket_perms; struct sockaddr_in server_addr; struct sockaddr_in6 server_addr6; struct sockaddr_un server_addr_unix; @@ -691,9 +692,27 @@ relay_server_create_socket (struct t_relay_server *server) return 0; } - /* change permissions: only the owner can use the unix socket */ + /* change permissions on the unix socket */ if (server->unix_socket) - chmod (server->path, 0700); + { + if (!weechat_util_parse_long ( + weechat_config_string (relay_config_network_unix_socket_permissions), + 8, &unix_socket_perms)) + { + /* default: owner only (rwx------) */ + unix_socket_perms = 0700; + } + if (chmod (server->path, unix_socket_perms) < 0) + { + weechat_printf ( + NULL, + _("%s%s: warning: failed to set permissions on path %s (%s): " + "error %d %s"), + weechat_prefix ("error"), RELAY_PLUGIN_NAME, + server->path, server->protocol_string, + errno, strerror (errno)); + } + } #ifdef SOMAXCONN if (listen (server->sock, SOMAXCONN) != 0)