archrelease: copy trunk to extra-x86_64
[arch-packages.git] / memcached / repos / extra-x86_64 / 0001-tests-enable-drop_privileges-by-default-for-better-s.patch
blobac69536cebfab8362d2575ab650899c203f54e98
1 From 5647bec11c166707eaf348830bc2f5da11d554c0 Mon Sep 17 00:00:00 2001
2 From: Levente Polyak <levente@leventepolyak.net>
3 Date: Fri, 5 May 2023 18:13:57 +0200
4 Subject: [PATCH] tests: enable drop_privileges by default for better seccomp
5 coverage
7 ---
8 t/lib/MemcachedTest.pm | 4 +++-
9 1 file changed, 3 insertions(+), 1 deletion(-)
11 diff --git a/t/lib/MemcachedTest.pm b/t/lib/MemcachedTest.pm
12 index a9557e5..4a63913 100644
13 --- a/t/lib/MemcachedTest.pm
14 +++ b/t/lib/MemcachedTest.pm
15 @@ -298,7 +298,9 @@ sub new_memcached {
16 if ($< == 0) {
17 $args .= " -u root";
19 - $args .= " -o relaxed_privileges";
20 + if (supports_drop_priv()) {
21 + $args .= " -o drop_privileges,relaxed_privileges";
22 + }
24 my $udpport;
25 if ($args =~ /-l (\S+)/ || (($ssl_enabled || $unix_socket_disabled) && ($args !~ /-s (\S+)/))) {
26 --
27 2.40.1