aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libsandbox/libsandbox.c')
-rw-r--r--libsandbox/libsandbox.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libsandbox/libsandbox.c b/libsandbox/libsandbox.c
index 0ee92ae..b4d732d 100644
--- a/libsandbox/libsandbox.c
+++ b/libsandbox/libsandbox.c
@@ -970,6 +970,15 @@ static int check_syscall(sbcontext_t *sbcontext, int sb_nr, const char *func,
if (trace_pid && errno == ESRCH)
return 2;
+ /* Underlying directory we operate on went away: #590084 */
+ if (!absolute_path && !resolved_path && errno == ENOENT) {
+ int sym_len = SB_MAX_STRING_LEN + 1 - strlen(func);
+ if (sbcontext->show_access_violation)
+ sb_eerror("%sACCESS DENIED%s: %s:%*s'%s' (from deleted directory, see https://bugs.gentoo.org/590084)\n",
+ COLOR_RED, COLOR_NORMAL, func, sym_len, "", file);
+ return 0;
+ }
+
/* If we get here, something bad happened */
sb_ebort("ISE: %s(%s)\n"
"\tabs_path: %s\n"