Merge lp:~thumper/juju-core/juju-ssh-dir-as-user into lp:~go-bot/juju-core/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Tim Penhey | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 2212 | ||||
Proposed branch: | lp:~thumper/juju-core/juju-ssh-dir-as-user | ||||
Merge into: | lp:~go-bot/juju-core/trunk | ||||
Diff against target: |
254 lines (+155/-8) 4 files modified
cmd/juju/main_test.go (+1/-7) utils/ssh/clientkeys.go (+6/-1) utils/sudo.go (+57/-0) utils/sudo_test.go (+91/-0) |
||||
To merge this branch: | bzr merge lp:~thumper/juju-core/juju-ssh-dir-as-user | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+201876@code.launchpad.net |
Commit message
Fix the creation of ~/.juju/ssh to be user owned
If the user's first interaction is with bootstrapping the
local provider with sudo, we want to make sure that the
directory and content is owned by the user.
Drive by fix for the cmd/juju MainSuite. I had a root owned
~/.juju/ssh directory, and the test was trying to read it and
failing, so I isolated the test by having it use the FakeHomeSuite
which overrides $HOME (and other things).
Many other utilities written to help with dealing with
creating directories and changing ownership of files to the
user if running under sudo.
Description of the change
Fix the creation of ~/.juju/ssh to be user owned
If the user's first interaction is with bootstrapping the
local provider with sudo, we want to make sure that the
directory and content is owned by the user.
Drive by fix for the cmd/juju MainSuite. I had a root owned
~/.juju/ssh directory, and the test was trying to read it and
failing, so I isolated the test by having it use the FakeHomeSuite
which overrides $HOME (and other things).
Many other utilities written to help with dealing with
creating directories and changing ownership of files to the
user if running under sudo.
Reviewers: mp+201876_ code.launchpad. net,
Message:
Please take a look.
Description:
Fix the creation of ~/.juju/ssh to be user owned
If the user's first interaction is with bootstrapping the
local provider with sudo, we want to make sure that the
directory and content is owned by the user.
Drive by fix for the cmd/juju MainSuite. I had a root owned
~/.juju/ssh directory, and the test was trying to read it and
failing, so I isolated the test by having it use the FakeHomeSuite
which overrides $HOME (and other things).
Many other utilities written to help with dealing with
creating directories and changing ownership of files to the
user if running under sudo.
https:/ /code.launchpad .net/~thumper/ juju-core/ juju-ssh- dir-as- user/+merge/ 201876
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/52950043/
Affected files (+194, -8 lines): main_test. go clientkeys. go
A [revision details]
M cmd/juju/
M utils/file.go
M utils/file_test.go
M utils/ssh/
M utils/sudo.go
M utils/sudo_test.go