znc: drop unneeded root check patch
authorJonas Gorski <redacted>
Thu, 12 Jul 2018 13:22:30 +0000 (15:22 +0200)
committerJonas Gorski <redacted>
Fri, 27 Jul 2018 13:10:42 +0000 (15:10 +0200)
We don't run znc as root anymore, so no need to do the root check after
loading the config.

Signed-off-by: Jonas Gorski <redacted>
net/znc/Makefile
net/znc/patches/100-move_rootcheck_after_config.patch [deleted file]

index 4611f09c6dfe3b78eac1b019df199f6340135eec..cb3917f2eb1e749a026958c511229bb8e33e0789 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=znc
 PKG_VERSION:=1.7.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://znc.in/releases \
diff --git a/net/znc/patches/100-move_rootcheck_after_config.patch b/net/znc/patches/100-move_rootcheck_after_config.patch
deleted file mode 100644 (file)
index 6da6849..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-diff --git a/src/main.cpp b/src/main.cpp
-index 6ea10ec..0bf028b 100644
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -422,23 +422,6 @@ int main(int argc, char** argv) {
-         CUtils::PrintStatus(true, "");
-     }
--    if (isRoot()) {
--        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) {
--            CZNC::DestroyInstance();
--            return 1;
--        }
--        CUtils::PrintError("You have been warned.");
--        CUtils::PrintError(
--            "Hit CTRL+C now if you don't want to run ZNC as root.");
--        CUtils::PrintError("ZNC will start in 30 seconds.");
--        sleep(30);
--    }
--
-     if (bMakeConf) {
-         if (!pZNC->WriteNewConfig(sConfig)) {
-             CZNC::DestroyInstance();
-@@ -460,6 +443,23 @@ int main(int argc, char** argv) {
-         return 1;
-     }
-+    if (isRoot()) {
-+        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) {
-+            CZNC::DestroyInstance();
-+            return 1;
-+        }
-+        CUtils::PrintError("You have been warned.");
-+        CUtils::PrintError(
-+            "Hit CTRL+C now if you don't want to run ZNC as root.");
-+        CUtils::PrintError("ZNC will start in 30 seconds.");
-+        sleep(30);
-+    }
-+
-     if (bForeground) {
-         int iPid = getpid();
-         CUtils::PrintMessage("Staying open for debugging [pid: " +
git clone https://git.99rst.org/PROJECT