summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/logic/sfrt_map_input.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/logic/sfrt_map_input.c b/src/logic/sfrt_map_input.c
index d73ace6..aba0427 100644
--- a/src/logic/sfrt_map_input.c
+++ b/src/logic/sfrt_map_input.c
@@ -7,6 +7,7 @@
#include <sys/stat.h>
#include <sofort/sofort.h>
+#include "sofort_driver_impl.h"
#include "sofort_errinfo_impl.h"
int sfrt_map_input(
@@ -16,12 +17,15 @@ int sfrt_map_input(
int prot,
struct sfrt_input * map)
{
+ int ret;
struct stat st;
bool fnew;
- int ret;
+ int fdcwd;
+
+ fdcwd = sfrt_driver_fdcwd(dctx);
if ((fnew = (fd < 0)))
- fd = open(path,O_RDONLY | O_CLOEXEC);
+ fd = openat(fdcwd,path,O_RDONLY|O_CLOEXEC);
if (fd < 0)
return SFRT_SYSTEM_ERROR(dctx);