mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Adding API for getting the current PolicyBuilder status.
PiperOrigin-RevId: 612892145 Change-Id: Iaf36e1c1064bac080b0115480212067d96756a2b
This commit is contained in:
parent
c8a26fbfa0
commit
1f390c279e
|
@ -744,6 +744,9 @@ class PolicyBuilder final {
|
|||
PolicyBuilder& AllowIPv4(const std::string& ip_and_mask, uint32_t port = 0);
|
||||
PolicyBuilder& AllowIPv6(const std::string& ip_and_mask, uint32_t port = 0);
|
||||
|
||||
// Returns the current status of the PolicyBuilder.
|
||||
absl::Status GetStatus() { return last_status_; }
|
||||
|
||||
private:
|
||||
friend class PolicyBuilderPeer; // For testing
|
||||
friend class StackTracePeer;
|
||||
|
@ -810,7 +813,7 @@ class PolicyBuilder final {
|
|||
absl::flat_hash_set<uint32_t> handled_syscalls_;
|
||||
|
||||
// Error handling
|
||||
absl::Status last_status_;
|
||||
absl::Status last_status_ = absl::OkStatus();
|
||||
bool already_built_ = false;
|
||||
|
||||
struct {
|
||||
|
|
Loading…
Reference in New Issue
Block a user