mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-26 16:11:56 +02:00
scripts: Dump symbols for executables that are not user readable
If an executable was only readable by root, we would skip it with a "Binary is not user readable" message because the 'file' command was not running as root. This kept us from generating Breakpad symbols for Xorg, which is now a top crasher for some boards. BUG=chrome-os-partner:11791 TEST=Manually ran the script on some files Change-Id: Id8a13c2968223e54cb1f6c5c3211e9bc2ca89057 Reviewed-on: https://gerrit.chromium.org/gerrit/29839 Tested-by: Michael Krebs <mkrebs@chromium.org> Reviewed-by: Brian Harring <ferringb@chromium.org> Commit-Ready: Michael Krebs <mkrebs@chromium.org>
This commit is contained in:
parent
27b5edb4db
commit
5f43eb08d4
@ -121,7 +121,7 @@ get_debug_for_text() {
|
||||
# Returns true if the file given is a 32-bit ELF file.
|
||||
is_32b_elf() {
|
||||
local elf="$1"
|
||||
file "${elf}" | grep -q "ELF 32-bit"
|
||||
sudo file "${elf}" | grep -q "ELF 32-bit"
|
||||
}
|
||||
|
||||
# Dump given debug and text file. Returns 1 if any errors, even
|
||||
@ -205,10 +205,6 @@ process_file() {
|
||||
# Allow files to not exist, for instance if they are in the INSTALL_MASK.
|
||||
warn "Binary does not exist: ${text_file}"
|
||||
return 0
|
||||
elif [ ! -r "${text_file}" ]; then
|
||||
# Allow files to not be readable, for instance setuid programs like passwd
|
||||
warn "Binary is not user readable: ${text_file}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
run_job "${debug_file}" "${text_file}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user