Backed out 2 changesets (bug 1409900) for failing browser chrome on Linux opt at browser/base/content/test/general/browser_bug590206.js r=backout a=backout.

Backed out changeset 83296a355dd4 (bug 1409900)
Backed out changeset 072007f83431 (bug 1409900)
This commit is contained in:
Attila Craciun 2017-10-27 16:15:47 +03:00
parent 5c15da1f08
commit 21363323fd

View File

@ -539,39 +539,6 @@ private:
return ConvertError(socketpair(AF_UNIX, SOCK_SEQPACKET, 0, fds));
}
static intptr_t StatFsTrap(ArgsRef aArgs, void* aux) {
auto path = reinterpret_cast<const char*>(aArgs.args[0]);
// *buf could be either struct statfs or struct statfs64,
// depending on syscall -- and the kernel ABI structs in
// <asm/statfs.h> are not the same as the C API structs in
// <sys/statfs.h>. Since we're not touching any of the fields,
// avoid all that and just use void*.
auto buf = reinterpret_cast<void*>(aArgs.args[1]);
int fd = open(path, O_RDONLY);
if (fd < 0) {
return -errno;
}
intptr_t rv;
switch (aArgs.nr) {
case __NR_statfs:
rv = DoSyscall(__NR_fstatfs, fd, buf);
break;
#ifdef __NR_statfs64
case __NR_statfs64:
rv = DoSyscall(__NR_fstatfs64, fd, buf);
break;
#endif
default:
MOZ_ASSERT(false);
rv = -ENOSYS;
}
close(fd);
return rv;
}
public:
explicit ContentSandboxPolicy(SandboxBrokerClient* aBroker,
const std::vector<int>& aSyscallWhitelist)
@ -724,13 +691,12 @@ public:
case __NR_getppid:
return Trap(GetPPidTrap, nullptr);
CASES_FOR_statfs:
return Trap(StatFsTrap, nullptr);
// Filesystem syscalls that need more work to determine who's
// using them, if they need to be, and what we intend to about it.
case __NR_getcwd:
CASES_FOR_statfs:
CASES_FOR_fstatfs:
case __NR_quotactl:
CASES_FOR_fchown:
case __NR_fchmod:
case __NR_flock: