From 06689479117395efdc60d0f214bb2b77e55dba97 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 13 Dec 2010 19:22:30 +0000 Subject: [PATCH] [packages] znc: commit missing parts of r24548 SVN-Revision: 24552 --- .../001-move_rootcheck_after_config.patch | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 net/znc/patches/001-move_rootcheck_after_config.patch diff --git a/net/znc/patches/001-move_rootcheck_after_config.patch b/net/znc/patches/001-move_rootcheck_after_config.patch new file mode 100644 index 0000000000..6e401ac7e3 --- /dev/null +++ b/net/znc/patches/001-move_rootcheck_after_config.patch @@ -0,0 +1,43 @@ +--- znc-0.094/main.cpp.orig 2010-10-25 02:30:18.000000000 +0200 ++++ znc-0.094/main.cpp 2010-10-25 02:52:03.000000000 +0200 +@@ -194,19 +194,6 @@ + } + #endif + +- 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) { +- delete pZNC; +- 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)) { + delete pZNC; +@@ -227,6 +214,20 @@ + 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) { ++ delete pZNC; ++ 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: " + CString(iPid) + "]"); -- 2.30.2