From: Michael Orlitzky Date: Mon, 26 Feb 2018 19:56:00 +0000 (-0500) Subject: configure.ac: add checks for openat() and O_NOFOLLOW. X-Git-Tag: v0.1.0~2 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=d806ef795948c87e614cb2a4cfb80ec96a07d256;p=apply-default-acl.git configure.ac: add checks for openat() and O_NOFOLLOW. --- diff --git a/configure.ac b/configure.ac index dd028ff..130b10c 100644 --- a/configure.ac +++ b/configure.ac @@ -21,6 +21,15 @@ AC_TYPE_MODE_T AC_CHECK_HEADERS([ fcntl.h ftw.h getopt.h libgen.h limits.h sys/acl.h ]) AC_CHECK_HEADERS([ sys/libacl.h sys/types.h unistd.h ]) -LT_INIT +# We need openat() with O_NOFOLLOW from POSIX-2008. Without them, we +# can't operate securely; I would rather refuse to be built. +AC_CHECK_FUNC(openat, + [], + AC_MSG_ERROR(missing required openat function)) +AC_CHECK_DECLS([O_NOFOLLOW], + [], + [AC_MSG_ERROR(missing required O_NOFOLLOW flag in fcntl.h)], + [[#include ]]) +LT_INIT AC_OUTPUT