| Server IP : 82.208.35.60 / Your IP : 216.73.217.33 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/www/chromium/files/ |
Upload File : |
--- content/gpu/gpu_sandbox_hook_linux.cc.orig 2022-10-28 16:46:12 UTC
+++ content/gpu/gpu_sandbox_hook_linux.cc
@@ -121,6 +121,7 @@ void AddStandardChromeOsPermissions(
permissions->push_back(BrokerFilePermission::ReadOnly(kAngleGlesPath));
}
+#if !defined(OS_BSD)
void AddV4L2GpuPermissions(
std::vector<BrokerFilePermission>* permissions,
const sandbox::policy::SandboxSeccompBPF::Options& options) {
@@ -440,8 +441,10 @@ std::vector<BrokerFilePermission> FilePermissionsForGp
AddStandardGpuPermissions(&permissions);
return permissions;
}
+#endif
void LoadArmGpuLibraries() {
+#if !defined(OS_BSD)
// Preload the Mali library.
if (UseChromecastSandboxAllowlist()) {
for (const char* path : kAllowedChromecastPaths) {
@@ -483,6 +486,7 @@ void LoadArmGpuLibraries() {
dlopen(driver_paths[i], dlopen_flag);
}
}
+#endif
}
bool LoadAmdGpuLibraries() {
@@ -550,12 +554,14 @@ void LoadV4L2Libraries(
}
void LoadChromecastV4L2Libraries() {
+#if !defined(OS_BSD)
for (const char* path : kAllowedChromecastPaths) {
const std::string library_path(std::string(path) +
std::string("libvpcodec.so"));
if (dlopen(library_path.c_str(), dlopen_flag))
break;
}
+#endif
}
bool LoadLibrariesForGpu(
@@ -583,6 +589,7 @@ bool LoadLibrariesForGpu(
return true;
}
+#if !defined(OS_BSD)
sandbox::syscall_broker::BrokerCommandSet CommandSetForGPU(
const sandbox::policy::SandboxLinux::Options& options) {
sandbox::syscall_broker::BrokerCommandSet command_set;
@@ -605,13 +612,17 @@ bool BrokerProcessPreSandboxHook(
SetProcessTitleFromCommandLine(nullptr);
return true;
}
+#endif
} // namespace
bool GpuProcessPreSandboxHook(sandbox::policy::SandboxLinux::Options options) {
+ NOTIMPLEMENTED();
+#if !defined(OS_BSD)
sandbox::policy::SandboxLinux::GetInstance()->StartBrokerProcess(
CommandSetForGPU(options), FilePermissionsForGpu(options),
base::BindOnce(BrokerProcessPreSandboxHook), options);
+#endif
if (!LoadLibrariesForGpu(options))
return false;