summaryrefslogtreecommitdiff
path: root/src/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall.c')
-rw-r--r--src/syscall.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/syscall.c b/src/syscall.c
index d143f257b..ebe5dd9b6 100644
--- a/src/syscall.c
+++ b/src/syscall.c
@@ -24,6 +24,7 @@
#include "poke.h"
#include "retval.h"
#include <limits.h>
+#include <fcntl.h>
/* for struct iovec */
#include <sys/uio.h>
@@ -1019,6 +1020,10 @@ syscall_exiting_finish(struct tcb *tcp)
tcp->sys_func_rval = 0;
free_tcb_priv_data(tcp);
+#ifdef ENABLE_SECONTEXT
+ tcp->last_dirfd = AT_FDCWD;
+#endif
+
if (cflag)
tcp->ltime = tcp->stime;
}