Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 58240
Collapse All | Expand All

(-)libsandbox.c.orig (-2 / +3 lines)
Lines 1352-1359 Link Here
1352
static int
1352
static int
1353
before_syscall_open_char(const char *func, const char *file, const char *mode)
1353
before_syscall_open_char(const char *func, const char *file, const char *mode)
1354
{
1354
{
1355
	if ((strcmp(mode, "r") == 0) || (strcmp(mode, "rb") == 0)
1355
	if (*mode == 'r' && ((strcmp(mode, "r") == 0) ||
1356
			|| (strcmp(mode, "rm") == 0)) {
1356
			     /* The strspn accept args are known non-writable modifiers */
1357
			     (strlen(++mode) == strspn(mode, "xbtmc")))) {
1357
		return before_syscall("open_rd", file);
1358
		return before_syscall("open_rd", file);
1358
	} else {
1359
	} else {
1359
		return before_syscall("open_wr", file);
1360
		return before_syscall("open_wr", file);

Return to bug 58240