summaryrefslogtreecommitdiff
path: root/app-misc/jail/files/jail-2.0-openat-syscall.patch
blob: 37f2a59b14b9343dbd36ef38e3afab318595a2de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
commit 0894cc54b5b385201cdcf7ce227c6ea03d765ef9
Author: Alexander Zubkov <green@qrator.net>
Date:   Wed Oct 17 22:45:24 2018 +0200

    support openat() syscall too

diff --git a/lib/arch/generic/functions b/lib/arch/generic/functions
index b0c6572..b1fdbc8 100755
--- a/lib/arch/generic/functions
+++ b/lib/arch/generic/functions
@@ -647,9 +647,9 @@ sub extract_open_from_ldd {
 
   local $file;
   local $val;
-  if ($line =~ /^open\(\"(.+)\".+\)\s*=\s*([-]?\d+)/) {
-    $file = $1;
-    $val = $2;
+  if ($line =~ /^open(at)?\([^\"]*\"(.+)\".+\)\s*=\s*([-]?\d+)/) {
+    $file = $2;
+    $val = $3;
     return($file,$val);
   }
   return();