Merge lp:~thumper/juju-core/fix-prepare-chown into lp:~go-bot/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | Tim Penhey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2260 |
Proposed branch: | lp:~thumper/juju-core/fix-prepare-chown |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
54 lines (+0/-23) 1 file modified
environs/configstore/disk.go (+0/-23) |
To merge this branch: | bzr merge lp:~thumper/juju-core/fix-prepare-chown |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+203254@code.launchpad.net |
Commit message
Remove chown from environ.configstore
The chown code was there primarily for the local provider.
This is no longer needed (and had a slight bug where it wasn't
actually checking to see if the current user was root before
trying to chown the files and dirs).
The code has simply been removed. I have tested this with
another user I have on my laptop and the local provider bootstraps
fine.
Description of the change
Remove chown from environ.configstore
The chown code was there primarily for the local provider.
This is no longer needed (and had a slight bug where it wasn't
actually checking to see if the current user was root before
trying to chown the files and dirs).
The code has simply been removed. I have tested this with
another user I have on my laptop and the local provider bootstraps
fine.
Reviewers: mp+203254_ code.launchpad. net,
Message:
Please take a look.
Description:
Remove chown from environ.configstore
The chown code was there primarily for the local provider.
This is no longer needed (and had a slight bug where it wasn't
actually checking to see if the current user was root before
trying to chown the files and dirs).
The code has simply been removed. I have tested this with
another user I have on my laptop and the local provider bootstraps
fine.
https:/ /code.launchpad .net/~thumper/ juju-core/ fix-prepare- chown/+ merge/203254
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/51150044/
Affected files (+2, -23 lines): configstore/ disk.go
A [revision details]
M environs/
Index: [revision details] 20140125125332- eckpnh62bygibit l
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: environs/ configstore/ disk.go configstore/ disk.go' configstore/ disk.go 2014-01-22 22:48:54 +0000 configstore/ disk.go 2014-01-26 19:19:03 +0000 Join(d. dir, "environments", envName+".jenv")
=== modified file 'environs/
--- environs/
+++ environs/
@@ -58,20 +58,6 @@
return filepath.
}
-func ensurePathOwned ByUser( path string) error { rIds() Debugf( "Making %v owned by %d:%d", path, uid, gid) Join(d. dir, "environments") Debugf( "Making %v", path) ByUser( path)
- uid, gid, err := utils.SudoCalle
- if err != nil {
- return err
- }
- if uid != 0 {
- logger.
- if err := os.Chown(path, uid, gid); err != nil {
- return err
- }
- }
- return nil
-}
-
func (d *diskStore) mkEnvironmentsDir() error {
path := filepath.
logger.
@@ -79,9 +65,6 @@
if os.IsExist(err) {
return nil
}
- if err == nil {
- err = ensurePathOwned
- }
return err
}
@@ -101,9 +84,6 @@ ByUser( path); err != nil { Remove( tmpFile. Name()) ByUser( info.path) ; err != nil {
return nil, err
}
file.Close()
- if err := ensurePathOwned
- return nil, err
- }
return &environInfo{
created: true,
path: path,
@@ -203,9 +183,6 @@
os.
return fmt.Errorf("cannot rename new environment info file: %v", err)
}
- if err := ensurePathOwned
- return err
- }
info.initialized = true
return nil
}