Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3918)

Issue 40650049: Write ssh auth keys file to user home (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by wallyworld
Modified:
10 years, 3 months ago
Reviewers:
axw, mp+199932
Visibility:
Public.

Description

Write ssh auth keys file to user home The ssh auth keys file was being read and written from the home of the current user. This is not what we want, because the current user is root and we want to write the file to ~ubuntu. A username parameter was added to the ssh util methods. The file's ownership was also changed to the specified user. The existing utils.NormalizePath method had to be altered to account for the more complete user home expansion, since it previously just knew about ~/foo and now needs to know about ~user/foo also. https://code.launchpad.net/~wallyworld/juju-core/auth-keys-user/+merge/199932 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3

Patch Set 2 : Write ssh auth keys file to user home #

Unified diffs Side-by-side diffs Delta from patch set Stats (+200 lines, -68 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/machine_test.go View 3 chunks +3 lines, -1 line 0 comments Download
M cmd/plugins/juju-metadata/imagemetadata.go View 1 chunk +4 lines, -1 line 0 comments Download
M cmd/plugins/juju-metadata/signmetadata.go View 1 chunk +5 lines, -1 line 0 comments Download
M cmd/plugins/juju-metadata/toolsmetadata.go View 1 chunk +5 lines, -1 line 0 comments Download
M environs/filestorage/filestorage.go View 1 chunk +4 lines, -1 line 0 comments Download
M provider/local/environprovider.go View 1 chunk +4 lines, -1 line 0 comments Download
M utils/file.go View 1 1 chunk +43 lines, -8 lines 0 comments Download
M utils/file_test.go View 1 3 chunks +25 lines, -3 lines 0 comments Download
M utils/ssh/authorisedkeys.go View 9 chunks +63 lines, -22 lines 0 comments Download
M utils/ssh/authorisedkeys_test.go View 12 chunks +30 lines, -25 lines 0 comments Download
M worker/authenticationworker/worker.go View 3 chunks +6 lines, -2 lines 0 comments Download
M worker/authenticationworker/worker_test.go View 3 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 3
wallyworld
Please take a look.
10 years, 4 months ago (2013-12-23 05:23:35 UTC) #1
axw
LGTM https://codereview.appspot.com/40650049/diff/1/utils/file.go File utils/file.go (right): https://codereview.appspot.com/40650049/diff/1/utils/file.go#newcode45 utils/file.go:45: var userHomePathRegexp = regexp.MustCompile("(~(?P<user>[^/]*))/(?P<path>.*)") Pedant alert: this doesn't ...
10 years, 4 months ago (2013-12-23 05:45:16 UTC) #2
wallyworld
10 years, 4 months ago (2013-12-23 05:57:21 UTC) #3
Please take a look.

https://codereview.appspot.com/40650049/diff/1/utils/file_test.go
File utils/file_test.go (right):

https://codereview.appspot.com/40650049/diff/1/utils/file_test.go#newcode58
utils/file_test.go:58: err:  "invalid user bob: user: unknown user bob",
On 2013/12/23 05:45:17, axw wrote:
> I sure hope nobody has a user called bob on their machine ;)
> At my previous job, all build machines had a "bob" (the builder) account.

Changed invalid user to something !bob :-)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b