diff --git a/include/znc/Listener.h b/include/znc/Listener.h index 383547a2..dcb0fc9d 100644 --- a/include/znc/Listener.h +++ b/include/znc/Listener.h @@ -97,9 +97,7 @@ class CTCPListener : public CListener { class CUnixListener : public CListener { public: CUnixListener(const CString& sPath, const CString& sURIPrefix, bool bSSL, - EAcceptType eAccept) - : CListener(sURIPrefix, bSSL, eAccept), - m_sPath(sPath) {} + EAcceptType eAccept, const CString& sGid, const CString& sMode); ~CUnixListener(); CUnixListener(const CUnixListener&) = delete; @@ -107,6 +105,8 @@ class CUnixListener : public CListener { // Getters const CString& GetPath() const { return m_sPath; } + const CString& GetGroup() const { return m_sGid; } + CString GetMode() const; // !Getters bool Listen() override; @@ -114,6 +114,8 @@ class CUnixListener : public CListener { protected: CString m_sPath; + CString m_sGid; + int m_iMode; }; class CRealListener : public CZNCSock { diff --git a/include/znc/znc.h b/include/znc/znc.h index 1365d518..6e7f0f95 100644 --- a/include/znc/znc.h +++ b/include/znc/znc.h @@ -209,8 +209,9 @@ class CZNC : private CCoreTranslationMixin { bool AddTCPListener(unsigned short uPort, const CString& sBindHost, const CString& sURIPrefix, bool bSSL, EAddrType eAddr, CListener::EAcceptType eAccept, CString& sError); - bool AddUnixListener(const CString& sPath, const CString& sURIPrefix, bool bSSL, - CListener::EAcceptType eAccept, CString& sError); + bool AddUnixListener(const CString& sPath, const CString& sURIPrefix, + bool bSSL, CListener::EAcceptType eAccept, + const CString& sGroup, const CString& sMode, CString& sError); bool DelListener(CListener*); // For backwards-compatibility TODO: Remove diff --git a/modules/data/webadmin/tmpl/settings.tmpl b/modules/data/webadmin/tmpl/settings.tmpl index 4822cd7d..1443dd96 100644 --- a/modules/data/webadmin/tmpl/settings.tmpl +++ b/modules/data/webadmin/tmpl/settings.tmpl @@ -21,10 +21,9 @@
| FORMAT "Path" ?> | +FORMAT "Mode" ?> | +FORMAT "Group" ?> | +FORMAT "SSL" ?> | +FORMAT "IRC" ?> | +FORMAT "HTTP" ?> | +FORMAT "URIPrefix" ?> | +FORMAT "Delete" ?> | +
|---|---|---|---|---|---|---|---|
| unix: VAR Path ?> | +VAR Mode ?> | +VAR Group ?> | +
+ checked="checked" ENDIF ?>/>
+ |
+
+ checked="checked" ENDIF ?>/>
+ |
+
+ checked="checked" ENDIF ?>/>
+ |
+ VAR URIPrefix ?> | ++ + | +