From 5647bec11c166707eaf348830bc2f5da11d554c0 Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Fri, 5 May 2023 18:13:57 +0200 Subject: [PATCH] tests: enable drop_privileges by default for better seccomp coverage --- t/lib/MemcachedTest.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/lib/MemcachedTest.pm b/t/lib/MemcachedTest.pm index a9557e5..4a63913 100644 --- a/t/lib/MemcachedTest.pm +++ b/t/lib/MemcachedTest.pm @@ -298,7 +298,9 @@ sub new_memcached { if ($< == 0) { $args .= " -u root"; } - $args .= " -o relaxed_privileges"; + if (supports_drop_priv()) { + $args .= " -o drop_privileges,relaxed_privileges"; + } my $udpport; if ($args =~ /-l (\S+)/ || (($ssl_enabled || $unix_socket_disabled) && ($args !~ /-s (\S+)/))) { -- 2.40.1