95 lines
4.0 KiB
Diff
95 lines
4.0 KiB
Diff
diff --git sandbox/win/src/sandbox_policy.h sandbox/win/src/sandbox_policy.h
|
|
index daf2af3079a2a..00197897c3c73 100644
|
|
--- sandbox/win/src/sandbox_policy.h
|
|
+++ sandbox/win/src/sandbox_policy.h
|
|
@@ -281,7 +281,7 @@ class [[clang::lto_visibility_public]] TargetPolicy {
|
|
// Adds a blob of data that will be made available in the child early in
|
|
// startup via sandbox::GetDelegateData(). The contents of this data should
|
|
// not vary between children with the same TargetConfig().
|
|
- virtual void AddDelegateData(base::span<const uint8_t> data) = 0;
|
|
+ virtual void AddDelegateData(base::span<uint8_t> data) = 0;
|
|
};
|
|
|
|
} // namespace sandbox
|
|
diff --git sandbox/win/src/sandbox_policy_base.cc sandbox/win/src/sandbox_policy_base.cc
|
|
index 9b4f763a894bd..4ba0a7ab4de60 100644
|
|
--- sandbox/win/src/sandbox_policy_base.cc
|
|
+++ sandbox/win/src/sandbox_policy_base.cc
|
|
@@ -190,12 +190,12 @@ PolicyGlobal* ConfigBase::policy() {
|
|
return policy_;
|
|
}
|
|
|
|
-absl::optional<base::span<const uint8_t>> ConfigBase::policy_span() {
|
|
+absl::optional<base::span<uint8_t>> ConfigBase::policy_span() {
|
|
if (policy_) {
|
|
// Note: this is not policy().data_size as that relates to internal data,
|
|
// not the entire allocated policy area.
|
|
- return base::span<const uint8_t>(reinterpret_cast<uint8_t*>(policy_.get()),
|
|
- kPolMemSize);
|
|
+ return base::span<uint8_t>(reinterpret_cast<uint8_t*>(policy_.get()),
|
|
+ kPolMemSize);
|
|
}
|
|
return absl::nullopt;
|
|
}
|
|
@@ -783,19 +783,19 @@ bool PolicyBase::SetupHandleCloser(TargetProcess& target) {
|
|
return handle_closer->InitializeTargetHandles(target);
|
|
}
|
|
|
|
-absl::optional<base::span<const uint8_t>> PolicyBase::delegate_data_span() {
|
|
+absl::optional<base::span<uint8_t>> PolicyBase::delegate_data_span() {
|
|
if (delegate_data_) {
|
|
return base::make_span(*delegate_data_);
|
|
}
|
|
return absl::nullopt;
|
|
}
|
|
|
|
-void PolicyBase::AddDelegateData(base::span<const uint8_t> data) {
|
|
+void PolicyBase::AddDelegateData(base::span<uint8_t> data) {
|
|
CHECK(data.size() > 0u);
|
|
// Can only set this once - as there is only one region sent to the child.
|
|
CHECK(!delegate_data_);
|
|
delegate_data_ =
|
|
- std::make_unique<std::vector<const uint8_t>>(data.begin(), data.end());
|
|
+ std::make_unique<std::vector<uint8_t>>(data.begin(), data.end());
|
|
}
|
|
|
|
} // namespace sandbox
|
|
diff --git sandbox/win/src/sandbox_policy_base.h sandbox/win/src/sandbox_policy_base.h
|
|
index 9e6738f676d07..a3525e0cfe283 100644
|
|
--- sandbox/win/src/sandbox_policy_base.h
|
|
+++ sandbox/win/src/sandbox_policy_base.h
|
|
@@ -115,7 +115,7 @@ class ConfigBase final : public TargetConfig {
|
|
|
|
// Should only be called once the object is configured.
|
|
PolicyGlobal* policy();
|
|
- absl::optional<base::span<const uint8_t>> policy_span();
|
|
+ absl::optional<base::span<uint8_t>> policy_span();
|
|
std::vector<std::wstring>& blocklisted_dlls();
|
|
AppContainerBase* app_container();
|
|
IntegrityLevel integrity_level() { return integrity_level_; }
|
|
@@ -175,7 +175,7 @@ class PolicyBase final : public TargetPolicy {
|
|
ResultCode SetStdoutHandle(HANDLE handle) override;
|
|
ResultCode SetStderrHandle(HANDLE handle) override;
|
|
void AddHandleToShare(HANDLE handle) override;
|
|
- void AddDelegateData(base::span<const uint8_t> data) override;
|
|
+ void AddDelegateData(base::span<uint8_t> data) override;
|
|
|
|
// Creates a Job object with the level specified in a previous call to
|
|
// SetJobLevel().
|
|
@@ -237,13 +237,13 @@ class PolicyBase final : public TargetPolicy {
|
|
// time.
|
|
|
|
// Returns nullopt if no data has been set, or a view into the data.
|
|
- absl::optional<base::span<const uint8_t>> delegate_data_span();
|
|
+ absl::optional<base::span<uint8_t>> delegate_data_span();
|
|
|
|
// The user-defined global policy settings.
|
|
HANDLE stdout_handle_;
|
|
HANDLE stderr_handle_;
|
|
// An opaque blob of data the delegate uses to prime any pre-sandbox hooks.
|
|
- std::unique_ptr<std::vector<const uint8_t>> delegate_data_;
|
|
+ std::unique_ptr<std::vector<uint8_t>> delegate_data_;
|
|
|
|
std::unique_ptr<Dispatcher> dispatcher_;
|
|
|