Merge lp:~sidnei/juju-core/lxc-config-perms into lp:~go-bot/juju-core/trunk

Proposed by Sidnei da Silva
Status: Merged
Approved by: Sidnei da Silva
Approved revision: no longer in the source branch.
Merged at revision: 1605
Proposed branch: lp:~sidnei/juju-core/lxc-config-perms
Merge into: lp:~go-bot/juju-core/trunk
Diff against target: 25 lines (+2/-2)
2 files modified
container/lxc/lxc.go (+1/-1)
container/lxc/lxc_test.go (+1/-1)
To merge this branch: bzr merge lp:~sidnei/juju-core/lxc-config-perms
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+178672@code.launchpad.net

Commit message

Fix default perms on apt config

Installing the config with mode 0600 makes it impossible for a non-root user
to run any apt command.

https://codereview.appspot.com/12510043/

R=axwalk, thumper

Description of the change

Fix default perms on apt config

Installing the config with mode 0600 makes it impossible for a non-root user
to run any apt command.

https://codereview.appspot.com/12510043/

To post a comment you must log in.
Revision history for this message
Sidnei da Silva (sidnei) wrote :

Reviewers: mp+178672_code.launchpad.net,

Message:
Please take a look.

Description:
Fix default perms on apt config

Installing the config with mode 0600 makes it impossible for a non-root
user
to run any apt command.

https://code.launchpad.net/~sidnei/juju-core/lxc-config-perms/+merge/178672

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/12510043/

Affected files:
   A [revision details]
   M container/lxc/lxc.go
   M container/lxc/lxc_test.go

Index: [revision details]
=== 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-20130806053414-fbcxuyvncbfz3m8n
+New revision: <email address hidden>

Index: container/lxc/lxc.go
=== modified file 'container/lxc/lxc.go'
--- container/lxc/lxc.go 2013-08-05 17:45:38 +0000
+++ container/lxc/lxc.go 2013-08-06 07:40:45 +0000
@@ -365,7 +365,7 @@
     cloudConfig.AddFile(
      "/etc/apt/apt.conf.d/99proxy-extra",
      strings.Join(proxyLines, "\n"),
- 0600)
+ 0644)
    }
   }

Index: container/lxc/lxc_test.go
=== modified file 'container/lxc/lxc_test.go'
--- container/lxc/lxc_test.go 2013-08-05 17:38:28 +0000
+++ container/lxc/lxc_test.go 2013-08-06 07:40:45 +0000
@@ -123,7 +123,7 @@

   c.Assert(scripts[len(scripts)-4:], gc.DeepEquals, []string{
    "start jujud-machine-1-lxc-0",
- "install -m 600 /dev/null '/etc/apt/apt.conf.d/99proxy-extra'",
+ "install -m 644 /dev/null '/etc/apt/apt.conf.d/99proxy-extra'",
    fmt.Sprintf("echo '%s' > '/etc/apt/apt.conf.d/99proxy-extra'",
configProxyExtra),
    "ifconfig",
   })

Revision history for this message
Tim Penhey (thumper) wrote :
Revision history for this message
Andrew Wilkins (axwalk) wrote :

On 2013/08/06 07:42:52, sidnei.da.silva wrote:
> Please take a look.

LGTM, trivial.

https://codereview.appspot.com/12510043/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'container/lxc/lxc.go'
2--- container/lxc/lxc.go 2013-08-05 17:45:38 +0000
3+++ container/lxc/lxc.go 2013-08-06 07:43:29 +0000
4@@ -365,7 +365,7 @@
5 cloudConfig.AddFile(
6 "/etc/apt/apt.conf.d/99proxy-extra",
7 strings.Join(proxyLines, "\n"),
8- 0600)
9+ 0644)
10 }
11 }
12
13
14=== modified file 'container/lxc/lxc_test.go'
15--- container/lxc/lxc_test.go 2013-08-05 17:38:28 +0000
16+++ container/lxc/lxc_test.go 2013-08-06 07:43:29 +0000
17@@ -123,7 +123,7 @@
18
19 c.Assert(scripts[len(scripts)-4:], gc.DeepEquals, []string{
20 "start jujud-machine-1-lxc-0",
21- "install -m 600 /dev/null '/etc/apt/apt.conf.d/99proxy-extra'",
22+ "install -m 644 /dev/null '/etc/apt/apt.conf.d/99proxy-extra'",
23 fmt.Sprintf("echo '%s' > '/etc/apt/apt.conf.d/99proxy-extra'", configProxyExtra),
24 "ifconfig",
25 })

Subscribers

People subscribed via source and target branches

to status/vote changes: