diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-06-23 07:00:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-06-23 07:00:28 +0100 |
commit | e23cdda4dbb0c83b9e682ab5e916085a35203da5 (patch) | |
tree | 5a4ac448a3b288b731c24d947e0ce52df3cab07b /net-irc/znc | |
parent | 8187a741807f3e9a9e26304973cf18087dcf2560 (diff) |
gentoo resync : 23.06.2018
Diffstat (limited to 'net-irc/znc')
-rw-r--r-- | net-irc/znc/Manifest | 5 | ||||
-rw-r--r-- | net-irc/znc/files/znc-1.0-systemwideconfig.patch | 147 | ||||
-rw-r--r-- | net-irc/znc/files/znc.confd | 7 | ||||
-rw-r--r-- | net-irc/znc/files/znc.initd | 38 | ||||
-rw-r--r-- | net-irc/znc/metadata.xml | 6 |
5 files changed, 2 insertions, 201 deletions
diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest index c34452aeb01a..3d1a6eb9c02d 100644 --- a/net-irc/znc/Manifest +++ b/net-irc/znc/Manifest @@ -1,11 +1,8 @@ AUX README.gentoo 768 BLAKE2B 83e7cdf538b89a8ef6ab242c9f1d5b01dd5a57aa4dc5b4f1b96998fbe0e01fb554c2d6de02fc552a1ac4ab26584a7fa14c19a96b4eda1ebd0367b68f965c2402 SHA512 627d3a8291e228fbeb783e61f46fe82f45ebc2a3647962c9bda150651d9bcadef699b6318083fc2396e6acc988ddf0ae1c01694e618d099591fa0db0258879d6 AUX README.gentoo-r1 530 BLAKE2B 5feab666142884c67c3c1a51322bb614bbdbaa453a4b6a4eb17b9fe774e4a4b188471a449f2cb5a1d07845a02a5eb15f2fad08958a839306d2029f56e8306543 SHA512 d5be4c0fc0069e6e8c6bf92f281034a603d6041f2b9a54d4fa97cae662225095d4473f54c4573141396ecccf369158f6c0986cafb9c39837edf9ab15200c8e18 -AUX znc-1.0-systemwideconfig.patch 4252 BLAKE2B 432e232fdc8df1f13134a6e5f4d75bded260cc0b3beb1d611e93b98c840c59cf9800697c096dcb5d887ea017afbb693ea0c6fdf20afb317126eb8116043f1031 SHA512 4527317f8b45c77e329167cedd792eb7886b85eeb9cb0b39f7bb117edff9bdde406d3fc4aa81410a3b1f9f7957e8ac312cdd168469fdaefd234ddbbae279341e AUX znc-1.6.1-create-pidfile-per-default.patch 650 BLAKE2B 1316a818971396db3f2fea706afe57435a176db0f47e0e05fd5c53eeff9c5dfb2ffed201b75cd0bc9edbc521a962cb28ac1b8ac11d69729a41a1d01e3b7cd6ae SHA512 2e2342c8f87a58cd1703f19d3d76f58ac4c92a049de5b342dd46c2476a1344cbb9f85743fe387713a2465006f71f1379951d7f3770019f1867544b6705e0e8ec AUX znc-1.6.1-systemwideconfig.patch 8079 BLAKE2B f0ae13248ba1f49a8f4c7e49ea06c1107ebefdb916d09f8e45f21368f194daa33e0edd005595c9eb36014dab20e3a40e4fba13ec531fe40a3a18d71cc6183ebf SHA512 295a08dd5ce43b217e816148e272b722dff1a956ccdb5e58b0d337b7929a2bdae4e017ec686e820f89e53b310dd86ea8668095134d9618e5552ec323b83e624d -AUX znc.confd 123 BLAKE2B 7cd27d7ead7803a0ca6db222712ee9ecad0bb4944ee14c34a8caa3eaa73aac7facfcb7bf33b0efd93322c38e00523b99b160ce095960ad988190cad5720a4fe6 SHA512 352f18d64cbfbd5970c859f2ae2290c0ddafcbd8f1bb5d74f33976bc8388f65a75f8a9a73a093fbac12f2d243d4bcf74380bbb3aaab8d68f7bf4eab7ce3bea46 AUX znc.confd-r1 720 BLAKE2B 4857a8bcd36ed1008a558ac7b067d6fad53b5d39c0df9130ca28d4ac3db3924a3a1200682c19c7e6f7869f22338b492f73bf6ccbc2b723d117c9eebc10a89838 SHA512 3ab102f64ea0572350c8595fd3739874da591c43a3dbc3a740c72c53bd7418fded721d478d1fb92de0c0d18131313ba6679e842a135dfe239ea3f42821d8e468 -AUX znc.initd 810 BLAKE2B 1d4ddc2b361e5391eafd4b8318b665e2427514f87c755839e167ca14af110e3c7c2e9aefe801d610940eadc104116ad18321017c2ca5e6472462ab4f9b4cb6e5 SHA512 909bf953cbb583754b516ddaada1f8f2362866e601a9fdc52ed563c0f0012776a0066e81b8bb6d72562557e6736b7d4f014eac7b700882ce43db9299594b5e32 AUX znc.initd-r1 914 BLAKE2B df6854929c0dbddc2fa75dec0b5b4103ffc9c6a6d9de05c9f04c0d36a4ffff28e834e42b22c363e24be03435088b2fa4428486c08adedb12ff3b484445545b0c SHA512 01f44ab51f6fa29383b4a4bc6e5f19928ebac6b32f73fb96906113596a904324dd53ef9dbb895a8dd29028f3523e6f7285d2d5b2ee43058fc017f0b47ae788c1 AUX znc.initd-r2 952 BLAKE2B 81346bf0a1581543683eb5c125b29474c0bc01b8aee11c036a134c5a01042059564f2982aaec65715ac0a2c87b64fcd9746464148a81daeee549f4228d6ff55f SHA512 c3d676796aaa485dcaebee0fba58a8f86560cd192e0e2ccf06f58346c1368f58aa5be1c1e5160f8105e3dc5c684d3d1f82eff6a4d7b87c07f11450b72288727f DIST googletest-release-1.7.0.tar.gz 468653 BLAKE2B 8dfca8b79dcd7b64ce84bad11ee68c549f4fe3dff7638ed1d845af4a7f754ad5df782d2cbebdb9fecfda2499dae6585e07cda7a8c8c454f0b70723d5c9578aa4 SHA512 c623d5720c4ed574e95158529872815ecff478c03bdcee8b79c9b042a603533f93fe55f939bcfe2cd745ce340fd626ad6d9a95981596f1a4d05053d874cd1dfc @@ -17,4 +14,4 @@ EBUILD znc-1.6.5.ebuild 3474 BLAKE2B fb127e5cb20f375da773dc5bf628ba6c4a4d45b408f EBUILD znc-1.6.6.ebuild 3473 BLAKE2B 612f02114d9a058e109ee6f7185774bdc382e26abac72ff6b912997f1a8020ab67cbdd559739ffa5e7f121730d868ba54894fc333b63e41ae99706dca522d103 SHA512 06fc0f3897e7b2946f258cd48bc0a7ad689df339c2413cdddd7872a92774f17034d9d5f62e4d64222b62d07f1e321859428a05936f00775c63fa92805498456c EBUILD znc-1.7.0.ebuild 4121 BLAKE2B 3a9610b2ba4ef4f74691ead7e156e66e74c7b0f8a30605dab3a9ef81ecba709aeb23631a415bc89a3373d44b04d3749f8591afa70c0415cb87590675abf8a8b3 SHA512 58cccf6867a76bf08a67bb724397d9b1c0be7c0522dfb2b170fef6156c63af5138eef90e2037b721c5cc6bccd9fcce7c85758b846c7a4acef44df814e5075875 EBUILD znc-9999.ebuild 4121 BLAKE2B 3a9610b2ba4ef4f74691ead7e156e66e74c7b0f8a30605dab3a9ef81ecba709aeb23631a415bc89a3373d44b04d3749f8591afa70c0415cb87590675abf8a8b3 SHA512 58cccf6867a76bf08a67bb724397d9b1c0be7c0522dfb2b170fef6156c63af5138eef90e2037b721c5cc6bccd9fcce7c85758b846c7a4acef44df814e5075875 -MISC metadata.xml 757 BLAKE2B bbc8339f0d871c55ce85cee29b4217ec41dc56c835d1d332feecb98ff08f9297a9290ee9f217715832454a041bd372277ee6b7659d43d2ada9f778a29c32737d SHA512 fd055b958ea544d901a15bdf9f8af9ab437896f97d7fa76f84cb6eebfdf7b1de2e8f13d85757d8d4c7098fd6f2102b505084a8beb58156258aaa73367c479eaf +MISC metadata.xml 633 BLAKE2B 506bc5b769694797c07165febefd08354b744a28644148d86901442a8d437cee7ec2552382eaa280cd99fe3c00cd2ae3adfded62980fe2fce31e550f00f4fc25 SHA512 58c2f6174c32c3b2bc52d5589844305cdac275d38bff7ec959d8a7e1eb14991789ba218f3dab2a993ab98ff0af7f7a574c3bfefdf7c9fd495043892732cb2502 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 336163dd6a0c..000000000000 --- 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 9681f8d792fb..000000000000 --- 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 16af8b64c687..000000000000 --- 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 $? -} diff --git a/net-irc/znc/metadata.xml b/net-irc/znc/metadata.xml index 51954559918c..16293e77692c 100644 --- a/net-irc/znc/metadata.xml +++ b/net-irc/znc/metadata.xml @@ -2,13 +2,9 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> - <email>sautier.louis@gmail.com</email> + <email>sbraz@gentoo.org</email> <name>Louis Sautier</name> </maintainer> - <maintainer type="project"> - <email>proxy-maint@gentoo.org</email> - <name>Proxy Maintainers</name> - </maintainer> <use> <flag name="daemon">Allow znc to run as a system-wide service. Installs an init script and creates a znc user:group.</flag> <flag name="zlib">Enable mod_deflate-like gzip support for znc's web interface using <pkg>sys-libs/zlib</pkg>.</flag> |