From 94e91aa0e60551ebfe1c236176f455761909df7c Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 19 Nov 2020 14:29:56 +0000 Subject: Update libcap support --- src/ircd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/ircd.c') diff --git a/src/ircd.c b/src/ircd.c index 72c6d40..abd3997 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -23,7 +23,6 @@ * \brief Starts up and runs the ircd. * \version $Id$ */ -#define USE_LINUX_CAP #define _GNU_SOURCE #include "stdinc.h" #include "s_user.h" @@ -62,7 +61,7 @@ #include "conf_db.h" #include "conf_class.h" -#ifdef USE_LINUX_CAP +#ifdef HAVE_LIBCAP #include #include #include @@ -465,7 +464,7 @@ ssl_init(void) #endif /* HAVE_LIBCRYPTO */ } -#ifdef USE_LINUX_CAP +#ifdef HAVE_LIBCAP /* This drops ALL privs except for CAP_NET_BIND_SERVICE */ static int drop_priv(char *user, char *group) { @@ -530,7 +529,7 @@ main(int argc, char *argv[]) /* Check to see if the user is running us as root, which is a nono */ if (geteuid() == 0) { -#ifdef USE_LINUX_CAP +#ifdef HAVE_LIBCAP if (drop_priv(getenv("IRCD_USER"), getenv("IRCD_GROUP"))) { fprintf(stderr, "Unable to drop capabilities\n"); return -1; -- cgit