Page MenuHomeDevCentral

Compile an eggdrop with root runtime capability
Closed, ResolvedPublic

Description

We need an eggdrop to launch as root for TC2.

This is achievable editing eggdrop.h or config.h.

Event Timeline

dereckson claimed this task.
dereckson raised the priority of this task from to Normal.
dereckson updated the task description. (Show Details)
dereckson added projects: Dæghrefn, Servers.
dereckson added a subscriber: dereckson.

Actually, there is currently no option to achieve that. But we can remove the relevant code.

diff --git a/src/main.c b/src/main.c
index c078840..717117c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1050,15 +1050,6 @@ int main(int arg_c, char **arg_v)
 
   printf("\n%s\n", version);
 
-#ifndef CYGWIN_HACKS
-  /* Don't allow eggdrop to run as root
-   * This check isn't useful under cygwin and has been
-   * reported to cause trouble in some situations.
-   */
-  if (((int) getuid() == 0) || ((int) geteuid() == 0))
-    fatal("ERROR: Eggdrop will not run as root!", 0);
-#endif
-
 #ifndef REPLACE_NOTIFIER
   init_threaddata(1);
 #endif
$ ./configure --enable-ipv6 --enable-tls
[...]
checking for Tcl library... found /usr/local/lib/libtcl86.so
checking for Tcl header... found /usr/local/include/tcl8.6/tcl.h
[...]
checking for Tcl patch level... 8.6.4
[...]
$ make iconfig
[...]
$ make
[...]
$ make install
[...]
Installing in directory: '/home/surfboard/eggdrop'.
[...]