Unix listener: chmod and change group

Fix #1955
This commit is contained in:
Alexey Sokolov
2025-06-24 09:04:29 +01:00
parent 4b12c0dc3c
commit c46bd41037
7 changed files with 237 additions and 60 deletions

View File

@@ -1910,8 +1910,10 @@ class CWebAdminMod : public CModule {
eAddr, eAccept, sMessage);
} else {
CString sPath = WebSock.GetParam("path");
CString sMode = WebSock.GetParam("mode");
CString sGroup = WebSock.GetParam("group");
bResult = CZNC::Get().AddUnixListener(sPath, sURIPrefix, bSSL,
eAccept, sMessage);
eAccept, sGroup, sMode, sMessage);
}
if (bResult) {
@@ -2030,6 +2032,8 @@ class CWebAdminMod : public CModule {
dynamic_cast<const CUnixListener*>(pListener)) {
l["Type"] = "Unix";
l["Path"] = pUnixListener->GetPath();
l["Mode"] = pUnixListener->GetMode();
l["Group"] = pUnixListener->GetGroup();
// We can't determine whether it's the same port, as it's
// always "localhost". Just assume the user knows what he's
// doing. Unix sockets are advanced topic anyway.