Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore files containing the following paths: */dev/* */proc/* */sys/* #569

Merged
merged 1 commit into from
Apr 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion modules/S115_usermode_emulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -533,14 +533,17 @@ emulate_strace_run() {

if [[ "${#MISSING_AREAS[@]}" -gt 0 ]]; then
for MISSING_AREA in "${MISSING_AREAS[@]}"; do
if [[ "$MISSING_AREA" != */proc/* || "$MISSING_AREA" != */sys/* || "$MISSING_AREA" != */dev/* ]]; then
if [[ "$MISSING_AREA" != *"/proc/"* && "$MISSING_AREA" != *"/sys/"* && "$MISSING_AREA" != *"/dev/"* ]]; then
write_log "[*] Found missing area: $ORANGE$MISSING_AREA$NC" "$LOG_FILE_STRACER"

FILENAME_MISSING=$(basename "$MISSING_AREA")
write_log "[*] Trying to identify this missing file: $ORANGE$FILENAME_MISSING$NC" "$LOG_FILE_STRACER"
PATH_MISSING=$(dirname "$MISSING_AREA")

FILENAME_FOUND=$(find "$EMULATION_PATH_BASE" -xdev -ignore_readdir_race -name "$FILENAME_MISSING" 2>/dev/null | sort -u | head -1 || true)
if [[ "$FILENAME_FOUND" == *"/proc/"* || "$FILENAME_FOUND" == *"/sys/"* || "$FILENAME_FOUND" == *"/dev/"* ]]; then
continue
fi
if [[ -n "$FILENAME_FOUND" ]]; then
write_log "[*] Possible matching file found: $ORANGE$FILENAME_FOUND$NC" "$LOG_FILE_STRACER"
fi
Expand Down