agent: remove redundant checks

Remove redundant checks for executable files.

FIXes: #3730

Signed-off-by: Rouzip <1226015390@qq.com>
This commit is contained in:
Rouzip 2022-10-22 23:31:18 +08:00
parent 1bf64c9a11
commit 44d8de8923
No known key found for this signature in database

View File

@ -327,7 +327,7 @@ impl Sandbox {
// Reject non-file, symlinks and non-executable files
if !entry.file_type()?.is_file()
|| entry.file_type()?.is_symlink()
|| entry.metadata()?.permissions().mode() & 0o777 & 0o111 == 0
|| entry.metadata()?.permissions().mode() & 0o111 == 0
{
continue;
}