Automated rollback of commit 809fb49341.

PiperOrigin-RevId: 436285752
Change-Id: I0607d9db08343e23d22ba9cb945cb6ef74739a14
This commit is contained in:
Sandboxed API Team 2022-03-21 13:08:58 -07:00 committed by Copybara-Service
parent 809fb49341
commit df8a2f77eb
2 changed files with 1 additions and 13 deletions

View File

@ -15,14 +15,12 @@
#include "sandboxed_api/sandbox2/policybuilder.h" #include "sandboxed_api/sandbox2/policybuilder.h"
#include <asm/ioctls.h> // For TCGETS #include <asm/ioctls.h> // For TCGETS
#include <asm/unistd_64.h>
#include <fcntl.h> // For the fcntl flags #include <fcntl.h> // For the fcntl flags
#include <linux/filter.h> #include <linux/filter.h>
#include <linux/futex.h> #include <linux/futex.h>
#include <linux/net.h> // For SYS_CONNECT #include <linux/net.h> // For SYS_CONNECT
#include <linux/random.h> // For GRND_NONBLOCK #include <linux/random.h> // For GRND_NONBLOCK
#include <sys/mman.h> // For mmap arguments #include <sys/mman.h> // For mmap arguments
#include <sys/prctl.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/statvfs.h> #include <sys/statvfs.h>
#include <syscall.h> #include <syscall.h>
@ -648,11 +646,6 @@ PolicyBuilder& PolicyBuilder::AllowRename() {
return *this; return *this;
} }
PolicyBuilder& PolicyBuilder::AllowPrctlSetName() {
AddPolicyOnSyscall(__NR_prctl, {ARG_32(0), JEQ(PR_SET_NAME, ALLOW)});
return *this;
}
PolicyBuilder& PolicyBuilder::AllowFutexOp(int op) { PolicyBuilder& PolicyBuilder::AllowFutexOp(int op) {
return AddPolicyOnSyscall( return AddPolicyOnSyscall(
__NR_futex, { __NR_futex, {

View File

@ -379,11 +379,6 @@ class PolicyBuilder final {
// - renameat2 // - renameat2
PolicyBuilder& AllowRename(); PolicyBuilder& AllowRename();
// Appends code to allow setting the name of a thread
// Allows the following
// - prctl(PR_SET_NAME, ...)
PolicyBuilder& AllowPrctlSetName();
// Enables the syscalls necessary to start a statically linked binary // Enables the syscalls necessary to start a statically linked binary
// //
// NOTE: This will call BlockSyscallWithErrno(__NR_readlink, ENOENT). If you // NOTE: This will call BlockSyscallWithErrno(__NR_readlink, ENOENT). If you