From f5987d16cb78f710f853755303d10ce0f261496b Mon Sep 17 00:00:00 2001 From: Aviram Hassan Date: Thu, 9 May 2024 15:17:05 +0300 Subject: [PATCH] don't error on permission denied hookerror (#2435) * don't error on permission denied hookerror * .. --- changelog.d/+perm-denied.changed.md | 1 + mirrord/layer/src/error.rs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelog.d/+perm-denied.changed.md diff --git a/changelog.d/+perm-denied.changed.md b/changelog.d/+perm-denied.changed.md new file mode 100644 index 00000000000..9c694e6b730 --- /dev/null +++ b/changelog.d/+perm-denied.changed.md @@ -0,0 +1 @@ +Don't print error on permission denied \ No newline at end of file diff --git a/mirrord/layer/src/error.rs b/mirrord/layer/src/error.rs index 7d935ec0c0d..afb754c3ddc 100644 --- a/mirrord/layer/src/error.rs +++ b/mirrord/layer/src/error.rs @@ -17,7 +17,12 @@ mod ignore_codes { /// Error codes from [`libc`] that are **not** hard errors, meaning the operation may progress. /// /// Prefer using [`is_ignored_code`] instead of relying on this constant. - const IGNORE_ERROR_CODES: [i32; 3] = [libc::EINPROGRESS, libc::EAFNOSUPPORT, libc::EADDRINUSE]; + const IGNORE_ERROR_CODES: [i32; 4] = [ + libc::EINPROGRESS, + libc::EAFNOSUPPORT, + libc::EADDRINUSE, + libc::EPERM, + ]; /// Checks if an error code from some [`libc`] function should be treated as a hard error, or /// not.