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())));
|
||||
break;
|
||||
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());
|
||||
} else {
|
||||
result = absl::StrCat(
|
||||
"SYSCALL VIOLATION - Violating Syscall ",
|
||||
Syscall::GetArchDescription(GetSyscallArch()), "[", reason_code(),
|
||||
"/", Syscall(GetSyscallArch(), reason_code()).GetName(),
|
||||
"] Stack: ", GetStackTrace());
|
||||
result = "SYSCALL VIOLATION - Unknown Violation";
|
||||
}
|
||||
break;
|
||||
case sandbox2::Result::SIGNALED:
|
||||
|
|
Loading…
Reference in New Issue
Block a user