mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Full syscall info in Result::ToString
PiperOrigin-RevId: 501522999 Change-Id: I90c63984c053a5e7deaf4b7619e70c360cc892bb
This commit is contained in:
parent
858c407521
commit
2ae5370cfb
|
@ -78,14 +78,14 @@ std::string Result::ToString() const {
|
||||||
ReasonCodeEnumToString(static_cast<ReasonCodeEnum>(reason_code())));
|
ReasonCodeEnumToString(static_cast<ReasonCodeEnum>(reason_code())));
|
||||||
break;
|
break;
|
||||||
case sandbox2::Result::VIOLATION:
|
case sandbox2::Result::VIOLATION:
|
||||||
if (reason_code() == sandbox2::Result::VIOLATION_NETWORK) {
|
if (syscall_) {
|
||||||
|
result = absl::StrCat("SYSCALL VIOLATION - Violating Syscall ",
|
||||||
|
syscall_->GetDescription(),
|
||||||
|
" Stack: ", GetStackTrace());
|
||||||
|
} else if (reason_code() == sandbox2::Result::VIOLATION_NETWORK) {
|
||||||
result = absl::StrCat("NETWORK VIOLATION: ", GetNetworkViolation());
|
result = absl::StrCat("NETWORK VIOLATION: ", GetNetworkViolation());
|
||||||
} else {
|
} else {
|
||||||
result = absl::StrCat(
|
result = "SYSCALL VIOLATION - Unknown Violation";
|
||||||
"SYSCALL VIOLATION - Violating Syscall ",
|
|
||||||
Syscall::GetArchDescription(GetSyscallArch()), "[", reason_code(),
|
|
||||||
"/", Syscall(GetSyscallArch(), reason_code()).GetName(),
|
|
||||||
"] Stack: ", GetStackTrace());
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case sandbox2::Result::SIGNALED:
|
case sandbox2::Result::SIGNALED:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user