Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 590084 | Differences between
and this patch

Collapse All | Expand All

(-)a/libsandbox/libsandbox.c (+9 lines)
Lines 970-975 static int check_syscall(sbcontext_t *sbcontext, int sb_nr, const char *func, Link Here
970
	if (trace_pid && errno == ESRCH)
970
	if (trace_pid && errno == ESRCH)
971
		return 2;
971
		return 2;
972
972
973
	/* Underlying directory we operate on went away: #590084 */
974
	if (!absolute_path && !resolved_path && errno == ENOENT) {
975
		int sym_len = SB_MAX_STRING_LEN + 1 - strlen(func);
976
		if (sbcontext->show_access_violation)
977
			sb_eerror("%sACCESS DENIED%s:  %s:%*s'%s' (from deleted directory, see https://bugs.gentoo.org/590084)\n",
978
				COLOR_RED, COLOR_NORMAL, func, sym_len, "", file);
979
		return 0;
980
	}
981
973
	/* If we get here, something bad happened */
982
	/* If we get here, something bad happened */
974
	sb_ebort("ISE: %s(%s)\n"
983
	sb_ebort("ISE: %s(%s)\n"
975
		"\tabs_path: %s\n"
984
		"\tabs_path: %s\n"
(-)a/tests/script-16.sh (+11 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
addwrite $PWD
4
5
mkdir -p to-be/deleted
6
cd to-be/deleted
7
rmdir ../deleted
8
9
# In https://bugs.gentoo.org/590084 sanbox should deny
10
# access here and touch should fail:
11
! touch ../foo
(-)a/tests/script.at (-1 / +1 lines)
Lines 13-15 SB_CHECK(12) Link Here
13
SB_CHECK(13)
13
SB_CHECK(13)
14
SB_CHECK(14)
14
SB_CHECK(14)
15
SB_CHECK(15)
15
SB_CHECK(15)
16
- 
16
SB_CHECK(16)

Return to bug 590084