This reverts commit
a2a733e9f0da779bbe009736644f4481e22ca3d1.
The new iptables 1.8.12 release is broken on docker, pinpointed to the
getauxval() change that apparently can be nonzero in presence of LSMs.
That makes getauxval() useless for the purpose of detecting a setcap binary.
So revert this.
Bugzilla: https://bugzilla.netfilter.org/show_bug.cgi?id=1830
Signed-off-by: Florian Westphal <fw@strlen.de>
#include <netinet/ether.h>
#include <sys/socket.h>
#include <sys/stat.h>
-#include <sys/auxv.h>
#include <sys/statfs.h>
#include <sys/types.h>
#include <sys/utsname.h>
void xtables_init(void)
{
- /* xtables cannot be used with setuid/setcap in a safe way. */
- if (getuid() != geteuid() || getauxval(AT_SECURE))
+ /* xtables cannot be used with setuid in a safe way. */
+ if (getuid() != geteuid())
_exit(111);
xtables_libdir = getenv("XTABLES_LIBDIR");