Message-ID: <652b8fe7-95c0-3237-e0c6-d6a23fd1b0f2@...2080...> Date: Wed, 6 Apr 2022 15:41:57 +0200 MIME-Version: 1.0 Content-Language: en-US References: <20220329192934.1415-1-timo@...2669...> <20220330205536.139-1-timo@...2669...> <67b5b48f-619a-b344-9f51-e1bba55aa3d2@...2181...> From: David Sommerseth In-Reply-To: Subject: Re: [Openvpn-devel] [PATCH v2] Retain CAP_NET_ADMIN when dropping privileges List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit To: Timo Rothenpieler Cc: openvpn-devel@lists.sourceforge.net, Antonio Quartulli On 06/04/2022 14:44, Timo Rothenpieler wrote: >>> >>> --- a/configure.ac >>> +++ b/configure.ac >>> @@ -794,6 +794,25 @@ dnl >>>       esac >>>   fi >>> +dnl >>> +dnl Depend on libcap-ng on Linux >>> +dnl >>> +case "$host" in >>> +    *-*-linux*) >>> +        PKG_CHECK_MODULES([LIBCAPNG], >>> +                  [libcap-ng], >>> +                  [have_libcapng="yes"], >> >> do we really need have_libcapng? it seems it is not used further in >> configure.ac > > I have little to no experience with autotools, and I think this is > straight up copied from the openvpn3 setup. That's probably right. > Can I just leave the line empty? Or put empty [] there? Yes, [] should suffice. That said, it makes no big difference if it is there or not. If needed to check ("test") if libcap-ng is available or not, this checks needs to be added again though. That said, we do not have a consistent way of using PKG_CHECK_MODULES() in general. We have at least 4 different ways in use today. Probably something to clean-up some day later. -- kind regards, David Sommerseth OpenVPN Inc