Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Issue 700983006: Add NeedsSu for RunShellCommand to check whether it needs SU (Closed)

Created:
6 years, 1 month ago by perezju
Modified:
6 years, 1 month ago
Reviewers:
jbudorick
CC:
chromium-reviews, klundberg+watch_chromium.org, yfriedman+watch_chromium.org, jbudorick+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add NeedsSu for RunShellCommand to check whether it needs SU Currently, the as_root=True option causes run shell command to fail if "su" is not available (e.g. because on a user build), even when accessing resources which are not protected anyway. This leads to clients writing complex "is my resource protected" functions to determine the correct value to use for as_root. With this CL, as_root=True will only fail if (1) one is trying to access a protected resource and (2) we don't have privileged access to the device either through root or su. So clients can safely use always as_root=True in order to access a resource which _may_ be protected. BUG=430708 Committed: https://crrev.com/84f54907de984997ab9469721bc584090ce16462 Cr-Commit-Position: refs/heads/master@{#303063}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -37 lines) Patch
M build/android/pylib/device/device_utils.py View 13 chunks +43 lines, -24 lines 1 comment Download
M build/android/pylib/device/device_utils_test.py View 8 chunks +13 lines, -13 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
perezju
Sorry for spamming you with CL's :P
6 years, 1 month ago (2014-11-06 00:25:24 UTC) #1
perezju
6 years, 1 month ago (2014-11-06 00:26:06 UTC) #3
jbudorick
I want to see the trybot first, but this looks good. https://codereview.chromium.org/700983006/diff/1/build/android/pylib/device/device_utils.py File build/android/pylib/device/device_utils.py (left): ...
6 years, 1 month ago (2014-11-06 00:33:45 UTC) #4
jbudorick
lgtm
6 years, 1 month ago (2014-11-06 15:23:00 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/700983006/1
6 years, 1 month ago (2014-11-06 18:32:23 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1)
6 years, 1 month ago (2014-11-06 19:12:16 UTC) #8
commit-bot: I haz the power
6 years, 1 month ago (2014-11-06 19:12:53 UTC) #9
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/84f54907de984997ab9469721bc584090ce16462
Cr-Commit-Position: refs/heads/master@{#303063}

Powered by Google App Engine
This is Rietveld 408576698