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

Issue 9125022: Add root access check to cns server. (Closed)

Created:
8 years, 11 months ago by shadi
Modified:
8 years, 11 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, ddorwin+watch_chromium.org, fischman+watch_chromium.org, acolwell+watch_chromium.org, annacc+watch_chromium.org, pam+watch_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing), ihf+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Add root access check to cns server. We need to check that we can call traffic control commands with sudo -n commands. I added a check to quit cns gracefully if no root access is available. BUG=109498 TEST=unit tests (traffic_control, cns). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=117548

Patch Set 1 #

Total comments: 8

Patch Set 2 : Updated comments. #

Total comments: 5

Patch Set 3 : and again... #

Patch Set 4 : Minor changes. #

Total comments: 1

Patch Set 5 : Edit error msg. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -0 lines) Patch
M media/tools/constrained_network_server/cns.py View 1 1 chunk +6 lines, -0 lines 0 comments Download
M media/tools/constrained_network_server/traffic_control.py View 1 2 3 4 2 chunks +17 lines, -0 lines 1 comment Download

Messages

Total messages: 14 (0 generated)
shadi
Dale, can you please review?
8 years, 11 months ago (2012-01-07 04:32:36 UTC) #1
DaleCurtis
http://codereview.chromium.org/9125022/diff/1/media/tools/constrained_network_server/traffic_control.py File media/tools/constrained_network_server/traffic_control.py (right): http://codereview.chromium.org/9125022/diff/1/media/tools/constrained_network_server/traffic_control.py#newcode42 media/tools/constrained_network_server/traffic_control.py:42: """Checks if requirements are available to run traffic control ...
8 years, 11 months ago (2012-01-09 19:08:01 UTC) #2
shadi
updated comments. http://codereview.chromium.org/9125022/diff/1/media/tools/constrained_network_server/traffic_control.py File media/tools/constrained_network_server/traffic_control.py (right): http://codereview.chromium.org/9125022/diff/1/media/tools/constrained_network_server/traffic_control.py#newcode42 media/tools/constrained_network_server/traffic_control.py:42: """Checks if requirements are available to run ...
8 years, 11 months ago (2012-01-09 23:47:44 UTC) #3
DaleCurtis
http://codereview.chromium.org/9125022/diff/4001/media/tools/constrained_network_server/traffic_control.py File media/tools/constrained_network_server/traffic_control.py (right): http://codereview.chromium.org/9125022/diff/4001/media/tools/constrained_network_server/traffic_control.py#newcode48 media/tools/constrained_network_server/traffic_control.py:48: if not os.geteuid() == 0: Use != 0. http://codereview.chromium.org/9125022/diff/4001/media/tools/constrained_network_server/traffic_control.py#newcode49 ...
8 years, 11 months ago (2012-01-10 00:17:59 UTC) #4
shadi
http://codereview.chromium.org/9125022/diff/4001/media/tools/constrained_network_server/traffic_control.py File media/tools/constrained_network_server/traffic_control.py (right): http://codereview.chromium.org/9125022/diff/4001/media/tools/constrained_network_server/traffic_control.py#newcode48 media/tools/constrained_network_server/traffic_control.py:48: if not os.geteuid() == 0: I thought (from previous ...
8 years, 11 months ago (2012-01-10 00:36:39 UTC) #5
DaleCurtis
http://codereview.chromium.org/9125022/diff/4001/media/tools/constrained_network_server/traffic_control.py File media/tools/constrained_network_server/traffic_control.py (right): http://codereview.chromium.org/9125022/diff/4001/media/tools/constrained_network_server/traffic_control.py#newcode48 media/tools/constrained_network_server/traffic_control.py:48: if not os.geteuid() == 0: On 2012/01/10 00:36:39, shadi ...
8 years, 11 months ago (2012-01-10 00:40:01 UTC) #6
shadi
last review? :)
8 years, 11 months ago (2012-01-10 21:31:02 UTC) #7
DaleCurtis
http://codereview.chromium.org/9125022/diff/10001/media/tools/constrained_network_server/traffic_control.py File media/tools/constrained_network_server/traffic_control.py (right): http://codereview.chromium.org/9125022/diff/10001/media/tools/constrained_network_server/traffic_control.py#newcode50 media/tools/constrained_network_server/traffic_control.py:50: msg=('Cannot run traffic control \'tc\' command. ' Better written ...
8 years, 11 months ago (2012-01-10 21:35:07 UTC) #8
shadi
8 years, 11 months ago (2012-01-10 21:48:42 UTC) #9
DaleCurtis
LGTM, +fischman for final LGTM.
8 years, 11 months ago (2012-01-10 22:00:51 UTC) #10
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/9125022/diff/14001/media/tools/constrained_network_server/traffic_control.py File media/tools/constrained_network_server/traffic_control.py (right): http://codereview.chromium.org/9125022/diff/14001/media/tools/constrained_network_server/traffic_control.py#newcode49 media/tools/constrained_network_server/traffic_control.py:49: _Exec(['sudo', '-n', 'tc', '-help'], Note that this isn't fool-proof; ...
8 years, 11 months ago (2012-01-10 22:30:55 UTC) #11
Ami GONE FROM CHROMIUM
Oops, forgot to LGTM.
8 years, 11 months ago (2012-01-10 22:31:09 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shadi@chromium.org/9125022/14001
8 years, 11 months ago (2012-01-12 21:39:12 UTC) #13
commit-bot: I haz the power
8 years, 11 months ago (2012-01-13 00:03:04 UTC) #14
Change committed as 117548

Powered by Google App Engine
This is Rietveld 408576698