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

Issue 6659006: flimflam: add support for multiple profiles (Closed)

Created:
9 years, 9 months ago by Sam Leffler
Modified:
9 years, 7 months ago
CC:
chromium-os-reviews_chromium.org, sleffler+cc_chromium.org, Jason Glasgow, rochberg, Paul Stewart, stevenjb
Visibility:
Public.

Description

flimflam: add support for multiple profiles Add a stack of profiles and support for per-user profiles (stored in the cryptohome). This also adds support for operation without a profile so no persistent state is recorded (meant mostly for testing). Changes include: o add PushProfile, PopProfile, and PopAnyProfile D-bus directives to the Manager interface o on object load (Service, Device, etc.) walk the stack of profiles until an entry is found for the object (replace direct storage load/store of objects by calls to the profile code) o object save always write to the active profile which is the top of stack; if there is no active profile do nothing o have Service objects track the active profile where state was last saved; this is used when pop'ing a profile to invalidate in-memory state for the service (e.g. security credentials) o include Services in a Profile's properties only if it is the active profile o more correctly implement the notion that OfflineMode is accessible only in the Default profile (e.g. don't return it in a Profile's properties, disallow setting the property directly) o drop setting the ActiveProfile property; it does not make sense with the new model (use Push/Pop instead) o drop reading in all global profiles are startup; the old connman model does not make a lot of sense for us o change the storage layer to better support multiple profiles: - add a connman_storage_ident structure for file names which may include a user name; per-user storage is placed in a subdirectory of the user's home directory so creating files will fail unless the directory exists - revamp storage <object>_load/save methods so the storage_open/close work is done in the storage layer; this consolidates this logic in the storage code and better assures consistent error returns to the profile code so it can decide when to stop walking the profile stack on load - stop passing the profile name to the crypto routines; this was not being used; if we want to enable/disable crypto based on the profile this looks to be better done one layer up BUG=chromium-os:12948 TEST=manual:using test scripts; automated tests TBA Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=99c34cc

Patch Set 1 #

Total comments: 8

Patch Set 2 : respond to njw comments #

Patch Set 3 : fix possible race in profile changed handling #

Patch Set 4 : construct hidden ssid set from all profiles #

Patch Set 5 : fix dbus method spec for PopProfile #

Patch Set 6 : fix cleanup path and change services_changed to fix potential race #

Patch Set 7 : add --push option for restart after crash #

Patch Set 8 : many fixups #

Patch Set 9 : rebase #

Total comments: 28

Patch Set 10 : response to ers comments #

Patch Set 11 : rebase #

Patch Set 12 : more ers comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1319 lines, -607 lines) Patch
M Makefile.am View 1 2 chunks +4 lines, -1 line 0 comments Download
M configure.ac View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
M doc/manager-api.txt View 1 2 3 4 5 6 7 8 9 2 chunks +64 lines, -9 lines 0 comments Download
M doc/profile-api.txt View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +54 lines, -1 line 0 comments Download
M include/crypto.h View 1 chunk +2 lines, -4 lines 0 comments Download
M include/service.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -2 lines 0 comments Download
M include/storage.h View 2 chunks +11 lines, -6 lines 0 comments Download
M include/wifi.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M plugins/crypto_descbc.c View 3 chunks +4 lines, -8 lines 0 comments Download
M plugins/crypto_rot47.c View 2 chunks +2 lines, -4 lines 0 comments Download
M plugins/newwifi.c View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -3 lines 0 comments Download
M src/connman.h View 1 2 3 4 5 6 7 4 chunks +39 lines, -18 lines 0 comments Download
M src/crypto.c View 4 chunks +4 lines, -7 lines 0 comments Download
M src/device.c View 1 2 3 4 5 6 7 8 9 15 chunks +22 lines, -30 lines 0 comments Download
M src/ipconfig.c View 11 chunks +26 lines, -26 lines 0 comments Download
M src/main.c View 1 2 3 4 5 6 7 3 chunks +8 lines, -0 lines 0 comments Download
M src/manager.c View 1 2 3 4 5 6 7 3 chunks +66 lines, -10 lines 0 comments Download
M src/profile.c View 1 2 3 4 5 6 7 8 9 10 11 25 chunks +548 lines, -164 lines 0 comments Download
M src/service.c View 1 2 3 4 5 6 7 8 9 31 chunks +118 lines, -169 lines 0 comments Download
M src/storage.c View 1 11 chunks +122 lines, -54 lines 0 comments Download
M src/wifi.c View 1 2 3 2 chunks +62 lines, -0 lines 0 comments Download
A test/create-profile View 1 chunk +11 lines, -0 lines 0 comments Download
M test/flimflam.py View 1 2 3 4 5 6 7 8 9 1 chunk +17 lines, -0 lines 0 comments Download
A test/pop-profile View 1 chunk +13 lines, -0 lines 0 comments Download
A test/push-profile View 1 chunk +11 lines, -0 lines 0 comments Download
A test/rm-profile View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
A test/set-profile-property View 1 chunk +13 lines, -0 lines 0 comments Download
M test/test-profile View 1 chunk +75 lines, -91 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Sam Leffler
There are a couple of bug fixes I need to pull out into separate CL's. ...
9 years, 9 months ago (2011-03-09 20:44:29 UTC) #1
Sam Leffler
Add rginda for crypto mods and cmasone for general security review.
9 years, 9 months ago (2011-03-09 20:48:18 UTC) #2
rginda
On 2011/03/09 20:48:18, Sam Leffler wrote: > Add rginda for crypto mods and cmasone for ...
9 years, 9 months ago (2011-03-09 21:12:01 UTC) #3
Nathan Williams
A few little things, but it mostly looks good. My only concern is that I ...
9 years, 9 months ago (2011-03-09 21:28:10 UTC) #4
Sam Leffler
You also reminded me I needed to pull STORAGE_HOMEDIR out into configure which I did. ...
9 years, 9 months ago (2011-03-09 22:31:10 UTC) #5
Nathan Williams
The code LGTM. I still have a couple of questions about the model. 1. This ...
9 years, 9 months ago (2011-03-10 20:54:47 UTC) #6
Sam Leffler
On 2011/03/10 20:54:47, Nathan Williams wrote: > The code LGTM. I still have a couple ...
9 years, 9 months ago (2011-03-10 21:36:58 UTC) #7
Sam Leffler
PTAL While testing I found we crash on shutdown which made me look more carefully ...
9 years, 9 months ago (2011-03-11 22:10:18 UTC) #8
Sam Leffler
It appears this work is not ready. If you've got any pending comments feel free ...
9 years, 9 months ago (2011-03-12 17:28:47 UTC) #9
Sam Leffler
PTAL; I think it's time to get this work in. I've been running it for ...
9 years, 9 months ago (2011-03-22 21:37:14 UTC) #10
stevenjb (google-dont-use)
Hey Sam. I spoke to Kan and Zel yesterday about multiple profile support. Their feeling ...
9 years, 9 months ago (2011-03-22 21:50:48 UTC) #11
Sam Leffler
On Tue, Mar 22, 2011 at 2:50 PM, Steven Bennetts <stevenjb@google.com> wrote: > Hey Sam. ...
9 years, 9 months ago (2011-03-22 22:59:38 UTC) #12
Eric Shienbrood
Mostly comments about the API documentation. http://codereview.chromium.org/6659006/diff/21001/doc/manager-api.txt File doc/manager-api.txt (right): http://codereview.chromium.org/6659006/diff/21001/doc/manager-api.txt#newcode45 doc/manager-api.txt:45: only by, the ...
9 years, 9 months ago (2011-03-23 21:14:21 UTC) #13
Sam Leffler
http://codereview.chromium.org/6659006/diff/21001/doc/manager-api.txt File doc/manager-api.txt (right): http://codereview.chromium.org/6659006/diff/21001/doc/manager-api.txt#newcode45 doc/manager-api.txt:45: only by, the connection manager. Done http://codereview.chromium.org/6659006/diff/21001/doc/manager-api.txt#newcode47 doc/manager-api.txt:47: If ...
9 years, 9 months ago (2011-03-26 00:30:03 UTC) #14
Eric Shienbrood
Thanks for these responses. There were also a few comments in profile-api.txt and profile.c that ...
9 years, 9 months ago (2011-03-29 14:20:55 UTC) #15
Sam Leffler
http://codereview.chromium.org/6659006/diff/21001/doc/profile-api.txt File doc/profile-api.txt (right): http://codereview.chromium.org/6659006/diff/21001/doc/profile-api.txt#newcode54 doc/profile-api.txt:54: service has it's security credentials revoked but Done http://codereview.chromium.org/6659006/diff/21001/doc/profile-api.txt#newcode74 ...
9 years, 9 months ago (2011-03-29 18:25:35 UTC) #16
Eric Shienbrood
9 years, 9 months ago (2011-03-29 18:37:35 UTC) #17
LGTM

Powered by Google App Engine
This is Rietveld 408576698