From: Sotir Danailov Date: Wed, 8 Jan 2025 23:07:17 +0000 (+0100) Subject: conf: warn when capabilities are disabled or libcap is not found X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d8fd27b57bf1ebc9cdbf129547961339dd45b8b;p=thirdparty%2Flxc.git conf: warn when capabilities are disabled or libcap is not found The reason for this warning, is that the project will compile and when it does not work, it's not clear from the logs what the reason might be. Signed-off-by: Sotir Danailov --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 6a14c6036..1410ebe54 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2944,6 +2944,10 @@ int parse_cap(const char *cap_name, __u32 *cap) if (strequal(cap_name, "none")) return -2; +#if HAVE_LIBCAP == 0 + WARN("capabilities are disabled or libcap not found"); +#endif + for (size_t i = 0; i < end; i++) { if (!strequal(cap_name, caps_opt[i].name)) continue;