* [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/
@ 2015-09-15 15:41 Julian Ospald
0 siblings, 0 replies; 4+ messages in thread
From: Julian Ospald @ 2015-09-15 15:41 UTC (permalink / raw
To: gentoo-commits
commit: a1caf33ff9b18692b73acb925371658a57794ad0
Author: Julian Ospald <hasufell <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 15 15:12:13 2015 +0000
Commit: Julian Ospald <hasufell <AT> gentoo <DOT> org>
CommitDate: Tue Sep 15 15:40:15 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1caf33f
net-irc/znc: improve quoting in init file
net-irc/znc/files/znc.initd-r1 | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net-irc/znc/files/znc.initd-r1 b/net-irc/znc/files/znc.initd-r1
index 903a4fe..a6ef740 100644
--- a/net-irc/znc/files/znc.initd-r1
+++ b/net-irc/znc/files/znc.initd-r1
@@ -6,7 +6,7 @@
extra_commands="config"
extra_started_commands="reload save"
command="/usr/bin/znc"
-command_args="--datadir ${ZNC_DATADIR}"
+command_args="--datadir \"${ZNC_DATADIR}\""
pidfile="${ZNC_PIDFILE:-/run/znc/znc.pid}"
user=${ZNC_USER:-znc}
group=${ZNC_GROUP:-znc}
@@ -20,21 +20,21 @@ depend() {
}
start_pre() {
- checkpath -d -m 0770 -o ${user}:${group} $(dirname ${pidfile})
+ checkpath -d -m 0770 -o ${user}:${group} "$(dirname ${pidfile})"
}
stop_post() {
- rm -f ${pidfile}
+ rm -f "${pidfile}"
}
reload() {
ebegin "Reloading ZNC Configuration File from Disk"
- start-stop-daemon --signal SIGHUP --pidfile ${pidfile}
+ start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
eend $?
}
save() {
ebegin "Saving ZNC Configuration File to Disk"
- start-stop-daemon --signal SIGUSR1 --pidfile ${pidfile}
+ start-stop-daemon --signal SIGUSR1 --pidfile "${pidfile}"
eend $?
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/
@ 2017-01-15 2:33 Göktürk Yüksek
0 siblings, 0 replies; 4+ messages in thread
From: Göktürk Yüksek @ 2017-01-15 2:33 UTC (permalink / raw
To: gentoo-commits
commit: 9198b2553a860df49728249505cedfb9780f968c
Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sun Jan 8 12:23:30 2017 +0000
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Sun Jan 15 02:31:49 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9198b255
net-irc/znc: remove unused patches
...2-webadmin-correctly-handle-channel-names.patch | 73 ----------------------
net-irc/znc/files/znc-1.6.1-libressl.patch | 19 ------
2 files changed, 92 deletions(-)
diff --git a/net-irc/znc/files/znc-1.2-webadmin-correctly-handle-channel-names.patch b/net-irc/znc/files/znc-1.2-webadmin-correctly-handle-channel-names.patch
deleted file mode 100644
index 93705f7..00000000
--- a/net-irc/znc/files/znc-1.2-webadmin-correctly-handle-channel-names.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-https://bugs.gentoo.org/show_bug.cgi?id=507794
-
-From 5e6e3be32acfeadeaf1fb3bb17bada08aec6432f Mon Sep 17 00:00:00 2001
-From: Uli Schlachter <psychon@znc.in>
-Date: Sun, 13 Apr 2014 20:36:55 +0200
-Subject: [PATCH] webadmin/add channel: Correctly handle channel names
-
-The CChan constructor makes sure that the channel name begins with a valid
-channel prefix. Thus, this could change the name of the resulting channel.
-
-When you edited an irc network which already had a channel "#foo", were
-connected to IRC (so ZNC knows which prefixes are valid) and added a channel
-"foo", this would lead to a problem:
-
-Webadmin checks and sees that there is no channel "foo" yet. Webadmin creates a
-new CChan instance for "foo". The CChan constructor notices that "f" is not a
-valid channel prefix and instead calls itself "#foo". Then,
-CIRCNetwork::AddChan() would see that this channel already exists, delete the
-given channel and return false.
-
-However, webadmin didn't check this result and would continue changing settings
-on an already destroyed CChan instance.
-
-Fix this by checking if the channel exists after CChan had its chance to mess
-with the channel name. Also handle failures from CIRCNetwork::AddChan().
-
-Fixes #528.
-
-Signed-off-by: Uli Schlachter <psychon@znc.in>
----
- modules/webadmin.cpp | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp
-index 40a28d3..90ddfd2 100644
---- a/modules/webadmin.cpp
-+++ b/modules/webadmin.cpp
-@@ -668,13 +668,19 @@ class CWebAdminMod : public CModule {
- return true;
- }
-
-- if (pNetwork->FindChan(sChanName.Token(0))) {
-- WebSock.PrintErrorPage("Channel [" + sChanName.Token(0) + "] already exists");
-+ // This could change the channel name and e.g. add a "#" prefix
-+ pChan = new CChan(sChanName, pNetwork, true);
-+
-+ if (pNetwork->FindChan(pChan->GetName())) {
-+ WebSock.PrintErrorPage("Channel [" + pChan->GetName() + "] already exists");
-+ delete pChan;
- return true;
- }
-
-- pChan = new CChan(sChanName, pNetwork, true);
-- pNetwork->AddChan(pChan);
-+ if (!pNetwork->AddChan(pChan)) {
-+ WebSock.PrintErrorPage("Could not add channel [" + pChan->GetName() + "]");
-+ return true;
-+ }
- }
-
- pChan->SetBufferCount(WebSock.GetParam("buffercount").ToUInt(), spSession->IsAdmin());
-@@ -700,7 +706,7 @@ class CWebAdminMod : public CModule {
-
- CTemplate TmplMod;
- TmplMod["User"] = pUser->GetUserName();
-- TmplMod["ChanName"] = sChanName;
-+ TmplMod["ChanName"] = pChan->GetName();
- TmplMod["WebadminAction"] = "change";
- FOR_EACH_MODULE(it, pNetwork) {
- (*it)->OnEmbeddedWebRequest(WebSock, "webadmin/channel", TmplMod);
---
-1.9.1
-
diff --git a/net-irc/znc/files/znc-1.6.1-libressl.patch b/net-irc/znc/files/znc-1.6.1-libressl.patch
deleted file mode 100644
index 8bbe9cf..00000000
--- a/net-irc/znc/files/znc-1.6.1-libressl.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-$OpenBSD: patch-src_Csocket_cpp,v 1.1 2014/07/12 14:42:37 pascal Exp $
---- src/Csocket.cpp.orig Sat Jul 12 16:03:48 2014
-+++ src/Csocket.cpp Sat Jul 12 16:04:36 2014
-@@ -555,6 +555,7 @@ bool InitSSL( ECompType eCompressionType )
- }
- #endif /* _WIN32 */
-
-+#ifndef OPENSSL_NO_COMP
- COMP_METHOD *cm = NULL;
-
- if( CT_ZLIB & eCompressionType )
-@@ -570,6 +571,7 @@ bool InitSSL( ECompType eCompressionType )
- if( cm )
- SSL_COMP_add_compression_method( CT_RLE, cm );
- }
-+#endif
-
- // setting this up once in the begining
- g_iCsockSSLIdx = SSL_get_ex_new_index( 0, ( void * )"CsockGlobalIndex", NULL, NULL, NULL );
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/
@ 2018-06-17 12:46 Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2018-06-17 12:46 UTC (permalink / raw
To: gentoo-commits
commit: bbd5adeecb8da210b6aa45883c74d904c14fc301
Author: Alexey Sokolov <sokolov <AT> google <DOT> com>
AuthorDate: Sun Jun 17 10:22:54 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jun 17 12:46:09 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbd5adee
net-irc/znc: remove non-referenced files
Closes: https://github.com/gentoo/gentoo/pull/8873
net-irc/znc/files/znc-1.0-systemwideconfig.patch | 147 -----------------------
net-irc/znc/files/znc.confd | 7 --
net-irc/znc/files/znc.initd | 38 ------
3 files changed, 192 deletions(-)
diff --git a/net-irc/znc/files/znc-1.0-systemwideconfig.patch b/net-irc/znc/files/znc-1.0-systemwideconfig.patch
deleted file mode 100644
index 336163dd6a0..00000000000
--- a/net-irc/znc/files/znc-1.0-systemwideconfig.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-diff --git a/include/znc/znc.h b/include/znc/znc.h
-index 03be646..f493c83 100644
---- a/include/znc/znc.h
-+++ b/include/znc/znc.h
-@@ -169,6 +169,8 @@ public:
-
- static void DumpConfig(const CConfig* Config);
-
-+ void SetSystemWideConfig(bool systemWideConfig);
-+
- private:
- CFile* InitPidFile();
- bool DoRehash(CString& sError);
-@@ -209,6 +211,7 @@ protected:
- unsigned int m_uiConnectPaused;
- TCacheMap<CString> m_sConnectThrottle;
- bool m_bProtectWebSessions;
-+ bool m_bSystemWideConfig;
- };
-
- #endif // !_ZNC_H
-diff --git a/src/main.cpp b/src/main.cpp
-index a1f3904..4950911 100644
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -10,6 +10,9 @@
- #include <znc/FileUtils.h>
- #include <sys/wait.h>
- #include <signal.h>
-+#include <sys/types.h>
-+#include <pwd.h>
-+#include <grp.h>
-
- using std::cout;
- using std::endl;
-@@ -46,6 +49,7 @@ static const struct option g_LongOpts[] = {
- { "makepass", no_argument, 0, 's' },
- { "makepem", no_argument, 0, 'p' },
- { "datadir", required_argument, 0, 'd' },
-+ { "system-wide-config-as", required_argument, 0, 'S' },
- { 0, 0, 0, 0 }
- };
-
-@@ -127,6 +131,8 @@ int main(int argc, char** argv) {
- bool bMakeConf = false;
- bool bMakePass = false;
- bool bAllowRoot = false;
-+ bool bSystemWideConfig = false;
-+ CString sSystemWideConfigUser = "znc";
- bool bForeground = false;
- #ifdef ALWAYS_RUN_IN_FOREGROUND
- bForeground = true;
-@@ -135,7 +141,7 @@ int main(int argc, char** argv) {
- bool bMakePem = false;
- #endif
-
-- while ((iArg = getopt_long(argc, argv, "hvnrcspd:Df", g_LongOpts, &iOptIndex)) != -1) {
-+ while ((iArg = getopt_long(argc, argv, "hvnrcspd:DfS:", g_LongOpts, &iOptIndex)) != -1) {
- switch (iArg) {
- case 'h':
- GenerateHelp(argv[0]);
-@@ -153,6 +159,10 @@ int main(int argc, char** argv) {
- case 'c':
- bMakeConf = true;
- break;
-+ case 'S':
-+ bSystemWideConfig = true;
-+ sSystemWideConfigUser = optarg;
-+ break;
- case 's':
- bMakePass = true;
- break;
-@@ -187,8 +197,36 @@ int main(int argc, char** argv) {
- return 1;
- }
-
-+ if (bSystemWideConfig && getuid() == 0) {
-+ struct passwd *pwd;
-+
-+ pwd = getpwnam(sSystemWideConfigUser.c_str());
-+ if (pwd == NULL) {
-+ CUtils::PrintError("Daemon user not found.");
-+ return 1;
-+ }
-+
-+ if ((long) pwd->pw_uid == 0) {
-+ CUtils::PrintError("Please define a daemon user other than root.");
-+ return 1;
-+ }
-+ if (setgroups(0, NULL) != 0) {
-+ CUtils::PrintError("setgroups: Unable to clear supplementary group IDs");
-+ return 1;
-+ }
-+ if (setgid((long) pwd->pw_gid) != 0) {
-+ CUtils::PrintError("setgid: Unable to drop group privileges");
-+ return 1;
-+ }
-+ if (setuid((long) pwd->pw_uid) != 0) {
-+ CUtils::PrintError("setuid: Unable to drop user privileges");
-+ return 1;
-+ }
-+ }
-+
- CZNC* pZNC = &CZNC::Get();
- pZNC->InitDirs(((argc) ? argv[0] : ""), sDataDir);
-+ pZNC->SetSystemWideConfig(bSystemWideConfig);
-
- #ifdef HAVE_LIBSSL
- if (bMakePem) {
-@@ -229,7 +267,7 @@ int main(int argc, char** argv) {
- CUtils::PrintStatus(true, "");
- }
-
-- if (isRoot()) {
-+ if (isRoot() && !bSystemWideConfig) {
- CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid");
- CUtils::PrintError("reasons for this and it can, in theory, cause great damage!");
- if (!bAllowRoot) {
-diff --git a/src/znc.cpp b/src/znc.cpp
-index 9469790..297b021 100644
---- a/src/znc.cpp
-+++ b/src/znc.cpp
-@@ -47,6 +47,7 @@ CZNC::CZNC() {
- m_sConnectThrottle.SetTTL(30000);
- m_pLockFile = NULL;
- m_bProtectWebSessions = true;
-+ m_bSystemWideConfig = false;
- }
-
- CZNC::~CZNC() {
-@@ -952,7 +953,7 @@ bool CZNC::WriteNewConfig(const CString& sConfigFile) {
- CUtils::PrintMessage("");
-
- File.UnLock();
-- return bFileOpen && CUtils::GetBoolInput("Launch ZNC now?", true);
-+ return bFileOpen && !m_bSystemWideConfig && CUtils::GetBoolInput("Launch ZNC now?", true);
- }
-
- size_t CZNC::FilterUncommonModules(set<CModInfo>& ssModules) {
-@@ -1971,3 +1972,7 @@ void CZNC::LeakConnectQueueTimer(CConnectQueueTimer *pTimer) {
- bool CZNC::WaitForChildLock() {
- return m_pLockFile && m_pLockFile->ExLock();
- }
-+
-+void CZNC::SetSystemWideConfig(bool systemWideConfig) {
-+ m_bSystemWideConfig = systemWideConfig;
-+}
diff --git a/net-irc/znc/files/znc.confd b/net-irc/znc/files/znc.confd
deleted file mode 100644
index 9681f8d792f..00000000000
--- a/net-irc/znc/files/znc.confd
+++ /dev/null
@@ -1,7 +0,0 @@
-# /etc/conf.d/znc
-
-# Location of the znc configuration folder
-ZNC_CONF="/var/lib/znc"
-
-# User to run znc as
-ZNC_USER="znc"
diff --git a/net-irc/znc/files/znc.initd b/net-irc/znc/files/znc.initd
deleted file mode 100644
index 16af8b64c68..00000000000
--- a/net-irc/znc/files/znc.initd
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_commands="config"
-extra_started_commands="reload save"
-
-depend() {
- need net
-}
-
-start() {
- ebegin "Starting ZNC"
- start-stop-daemon --start --user ${ZNC_USER} --name znc \
- --exec /usr/bin/znc -- -d ${ZNC_CONF}
- eend $?
-}
-
-stop() {
- ebegin "Stopping ZNC"
- start-stop-daemon --signal SIGINT --name znc \
- --exec /usr/bin/znc -- -d ${ZNC_CONF}
- eend $?
-}
-
-reload() {
- ebegin "Reloading ZNC Configuration File from Disk"
- start-stop-daemon --signal SIGHUP --name znc \
- --exec /usr/bin/znc -- -d ${ZNC_CONF}
- eend $?
-}
-
-save() {
- ebegin "Saving ZNC Configuration File to Disk"
- start-stop-daemon --signal SIGUSR1 --name znc \
- --exec /usr/bin/znc -- -d ${ZNC_CONF}
- eend $?
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/
@ 2022-01-08 2:01 Louis Sautier
0 siblings, 0 replies; 4+ messages in thread
From: Louis Sautier @ 2022-01-08 2:01 UTC (permalink / raw
To: gentoo-commits
commit: e4bc068f905f39108da4c40fb210cea20ba3e25f
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 8 01:57:52 2022 +0000
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Sat Jan 8 01:59:44 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4bc068f
net-irc/znc: display qualified package name in README
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
net-irc/znc/files/README.gentoo-r1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net-irc/znc/files/README.gentoo-r1 b/net-irc/znc/files/README.gentoo-r1
index 1812383beb29..8fa94e2f0775 100644
--- a/net-irc/znc/files/README.gentoo-r1
+++ b/net-irc/znc/files/README.gentoo-r1
@@ -1,6 +1,6 @@
To run znc as a user, run 'znc --makeconf' to create a configuration file.
-To configure the system-wide daemon, you may run 'emerge --config znc'.
+To configure the system-wide daemon, you may run 'emerge --config net-irc/znc'.
If migrating from a user-based install, you can copy the existing
configuration files:
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-08 2:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-08 2:01 [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/files/ Louis Sautier
-- strict thread matches above, loose matches on Subject: below --
2018-06-17 12:46 Michał Górny
2017-01-15 2:33 Göktürk Yüksek
2015-09-15 15:41 Julian Ospald
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox