summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-07 18:42:14 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-07 19:06:03 +0300
commitaa2e8c01594d9a5f53e9136c746266b4449ba9e8 (patch)
tree5e028a82b61d3bbe9ad69cf6000e5cd2e53540b1
parentbe8764bfd3aadef528ea904faa787b78ae87a47a (diff)
downloadhercules-aa2e8c01594d9a5f53e9136c746266b4449ba9e8.tar.gz
hercules-aa2e8c01594d9a5f53e9136c746266b4449ba9e8.tar.bz2
hercules-aa2e8c01594d9a5f53e9136c746266b4449ba9e8.tar.xz
hercules-aa2e8c01594d9a5f53e9136c746266b4449ba9e8.zip
Dont show compilation warnings about root if building for ci.s20160708
And allow run under root in ci.
-rw-r--r--src/common/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/core.c b/src/common/core.c
index 08ed4b71b..e6b522926 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -202,14 +202,20 @@ bool usercheck(void)
#ifndef _WIN32
if (sysinfo->is_superuser()) {
if (!isatty(fileno(stdin))) {
+#ifdef BUILDBOT
+ return true;
+#else // BUILDBOT
ShowFatalError("You are running Hercules with root privileges, it is not necessary, nor recommended. "
"Aborting.\n");
return false; // Don't allow noninteractive execution regardless.
+#endif // BUILDBOT
}
ShowError("You are running Hercules with root privileges, it is not necessary, nor recommended.\n");
#ifdef I_AM_AWARE_OF_THE_RISK_AND_STILL_WANT_TO_RUN_HERCULES_AS_ROOT
+#ifndef BUILDBOT
#warning This Hercules build is not eligible to obtain support by the developers.
#warning The setting I_AM_AWARE_OF_THE_RISK_AND_STILL_WANT_TO_RUN_HERCULES_AS_ROOT is deprecated and should not be used.
+#endif // BUILDBOT
#else // not I_AM_AWARE_OF_THE_RISK_AND_STILL_WANT_TO_RUN_HERCULES_AS_ROOT
ShowNotice("Execution will be paused for 60 seconds. Press Ctrl-C if you wish to quit.\n");
ShowNotice("If you want to get rid of this message, please open %s and uncomment, near the top, the line saying:\n"