Don't abort on "single user operating systems" that don't know more than
one user account and therefore can't change user and group IDs.
Currently, the only such system supported by ngIRCd is Haiku, a BeOS
clone.
+#if !defined(SINGLE_USER_OS)
+
/**
* Get user and group ID of unprivileged "nobody" user.
*
/**
* Get user and group ID of unprivileged "nobody" user.
*
return true;
} /* NGIRCd_getNobodyID */
return true;
} /* NGIRCd_getNobodyID */
static bool
Random_Init_Kern(const char *file)
static bool
Random_Init_Kern(const char *file)
+#if !defined(SINGLE_USER_OS)
/* Check user ID */
if (Conf_UID == 0) {
pwd = getpwuid(0);
/* Check user ID */
if (Conf_UID == 0) {
pwd = getpwuid(0);
/* Change user ID */
if (getuid() != Conf_UID) {
/* Change user ID */
if (getuid() != Conf_UID) {
#ifdef S_SPLINT_S
#include "splint.h"
#endif
#ifdef S_SPLINT_S
#include "splint.h"
#endif
#define HOST_VENDOR "unknown"
#endif
#define HOST_VENDOR "unknown"
#endif
+#ifdef __HAIKU__
+#define SINGLE_USER_OS
+#endif