From 5f43eb08d4a4fa30dadc2ece1c72c7b0f5519863 Mon Sep 17 00:00:00 2001 From: Michael Krebs Date: Thu, 9 Aug 2012 16:48:26 -0700 Subject: [PATCH] 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 Reviewed-by: Brian Harring Commit-Ready: Michael Krebs --- cros_generate_breakpad_symbols | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cros_generate_breakpad_symbols b/cros_generate_breakpad_symbols index df3b17d875..966d0a3bd2 100755 --- a/cros_generate_breakpad_symbols +++ b/cros_generate_breakpad_symbols @@ -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}"