qt5-webengine: fix sandbox large file flag constant for ppc64
This commit is contained in:
parent
e5bdd2b120
commit
bba182874a
1 changed files with 6 additions and 10 deletions
|
@ -240,20 +240,16 @@ index d9789a713..6ff40c9b0 100644
|
||||||
// Ubuntu's version of glibc has a race condition in sem_post that can cause
|
// Ubuntu's version of glibc has a race condition in sem_post that can cause
|
||||||
// it to call futex(2) with bogus op arguments. To workaround this, we need
|
// it to call futex(2) with bogus op arguments. To workaround this, we need
|
||||||
// to allow those futex(2) calls to fail with EINVAL, instead of crashing the
|
// to allow those futex(2) calls to fail with EINVAL, instead of crashing the
|
||||||
@@ -246,9 +261,11 @@ ResultExpr RestrictFcntlCommands() {
|
@@ -259,6 +274,8 @@ ResultExpr RestrictFcntlCommands() {
|
||||||
// operator.
|
|
||||||
// Glibc overrides the kernel's O_LARGEFILE value. Account for this.
|
|
||||||
uint64_t kOLargeFileFlag = O_LARGEFILE;
|
uint64_t kOLargeFileFlag = O_LARGEFILE;
|
||||||
- if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips())
|
if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips())
|
||||||
+ if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips() \
|
|
||||||
+ || IsArchitecturePPC64())
|
|
||||||
kOLargeFileFlag = 0100000;
|
kOLargeFileFlag = 0100000;
|
||||||
|
+ else if (IsArchitecturePPC64())
|
||||||
|
+ kOLargeFileFlag = 0200000;
|
||||||
|
|
||||||
+
|
|
||||||
const Arg<int> cmd(1);
|
const Arg<int> cmd(1);
|
||||||
const Arg<long> long_arg(2);
|
const Arg<long> long_arg(2);
|
||||||
|
@@ -273,14 +290,23 @@ ResultExpr RestrictFcntlCommands() {
|
||||||
@@ -262,14 +279,23 @@ ResultExpr RestrictFcntlCommands() {
|
|
||||||
F_SETLKW,
|
F_SETLKW,
|
||||||
F_GETLK,
|
F_GETLK,
|
||||||
F_DUPFD,
|
F_DUPFD,
|
||||||
|
@ -280,7 +276,7 @@ index d9789a713..6ff40c9b0 100644
|
||||||
ResultExpr RestrictSocketcallCommand() {
|
ResultExpr RestrictSocketcallCommand() {
|
||||||
// Unfortunately, we are unable to restrict the first parameter to
|
// Unfortunately, we are unable to restrict the first parameter to
|
||||||
// socketpair(2). Whilst initially sounding bad, it's noteworthy that very
|
// socketpair(2). Whilst initially sounding bad, it's noteworthy that very
|
||||||
@@ -409,7 +435,7 @@ ResultExpr RestrictPrlimit(pid_t target_pid) {
|
@@ -420,7 +446,7 @@ ResultExpr RestrictPrlimit(pid_t target_pid) {
|
||||||
ResultExpr RestrictPtrace() {
|
ResultExpr RestrictPtrace() {
|
||||||
const Arg<int> request(0);
|
const Arg<int> request(0);
|
||||||
return Switch(request).CASES((
|
return Switch(request).CASES((
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue