sign_official_build: allow repacking firmware when executed by sudo

To prevent execution permissions lost after being copied to /tmp, force adding
a+rx to the staging file.

BUG=chromium-os:20797
TEST=sudo sign_official_build.sh ssd \
     x86-zgb-0.16.1089.0.bin ../../tests/devkeys ssd_image.bin

Change-Id: Ibee12dbb3faea9f6b05600d1343620e0af8633fb
Reviewed-on: http://gerrit.chromium.org/gerrit/8263
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
This commit is contained in:
Hung-Te Lin
2011-09-26 10:59:46 +08:00
parent 25a3dbc83c
commit bd3dad01b0

View File

@@ -354,6 +354,7 @@ resign_firmware_payload() {
new_shellball=$(make_temp_file)
cp -f "${firmware_bundle}" "${new_shellball}"
chmod a+rx "${new_shellball}"
repack_firmware_bundle "${shellball_dir}" "${new_shellball}"
sudo cp -f "${new_shellball}" "${firmware_bundle}"
sudo chmod a+rx "${firmware_bundle}"