Merge lp:~nuclearbob/utah/ssh-permissions into lp:utah

Proposed by Max Brustkern
Status: Merged
Merged at revision: 924
Proposed branch: lp:~nuclearbob/utah/ssh-permissions
Merge into: lp:utah
Diff against target: 47 lines (+12/-0)
2 files modified
debian/utah-client.postinst (+6/-0)
debian/utah.postinst (+6/-0)
To merge this branch: bzr merge lp:~nuclearbob/utah/ssh-permissions
Reviewer Review Type Date Requested Status
Javier Collado (community) Approve
Review via email: mp+166360@code.launchpad.net

Description of the change

This branch fixes the permissions on /var/lib/utah/.ssh after the previous permission setting commands break them.

To post a comment you must log in.
Revision history for this message
Javier Collado (javier.collado) wrote :

The change looks fine, but I'm wondering why the fix needs to be duplicated.
Given that `utah` depends on `utah-client`, I believe all issues could be
addressed just in the `utah-client` package.

Revision history for this message
Max Brustkern (nuclearbob) wrote :

If utah install after utah-client, then the chmod that runs as part of the
utah postinst will break the permissions again. Ultimately, we should
probably solve this by moving more of the setup into either utah-client or
utah-common so that what's in the main utah package is more of an overlay
on that.

On Thu, May 30, 2013 at 3:30 AM, Javier Collado <
<email address hidden>> wrote:

> The change looks fine, but I'm wondering why the fix needs to be
> duplicated.
> Given that `utah` depends on `utah-client`, I believe all issues could be
> addressed just in the `utah-client` package.
>
> --
> https://code.launchpad.net/~nuclearbob/utah/ssh-permissions/+merge/166360
> You are the owner of lp:~nuclearbob/utah/ssh-permissions.
>

Revision history for this message
Andy Doan (doanac) wrote :

Looks good. My only comment might be to make this less brittle with something like:

 sshdir=~utah/.ssh

then do the chmod's on that.

lp:~nuclearbob/utah/ssh-permissions updated
924. By Max Brustkern

Implemented SSH_DIR variable per Andy's suggestion

Revision history for this message
Javier Collado (javier.collado) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/utah-client.postinst'
2--- debian/utah-client.postinst 2013-05-20 18:32:21 +0000
3+++ debian/utah-client.postinst 2013-05-30 17:19:23 +0000
4@@ -13,6 +13,7 @@
5 [ -z "$SERVER_NAME" ] && SERVER_NAME="UTAH"
6 [ -z "$SERVER_GROUP" ] && SERVER_GROUP=utah
7 [ -z "$SERVER_GROUPS" ] && SERVER_GROUPS="libvirtd,kvm"
8+ [ -z "$SSH_DIR" ] && SSH_DIR=~utah/.ssh
9
10 if ! getent group | grep -q "^$SERVER_GROUP:"
11 then
12@@ -32,6 +33,11 @@
13 chmod -R ug+rw $DIR
14 fi
15 done
16+ if [ -d "$SSH_DIR" ]
17+ then
18+ chmod 600 /var/lib/utah/.ssh/*
19+ chmod 700 /var/lib/utah/.ssh
20+ fi
21 }
22
23 usersetup
24
25=== modified file 'debian/utah.postinst'
26--- debian/utah.postinst 2013-05-20 18:32:21 +0000
27+++ debian/utah.postinst 2013-05-30 17:19:23 +0000
28@@ -57,6 +57,7 @@
29 [ -z "$SERVER_NAME" ] && SERVER_NAME="UTAH"
30 [ -z "$SERVER_GROUP" ] && SERVER_GROUP=utah
31 [ -z "$SERVER_GROUPS" ] && SERVER_GROUPS="libvirtd,kvm"
32+ [ -z "$SSH_DIR" ] && SSH_DIR=~utah/.ssh
33
34 if ! getent group | grep -q "^$SERVER_GROUP:"
35 then
36@@ -76,6 +77,11 @@
37 chmod -R ug+rw $DIR
38 fi
39 done
40+ if [ -d "$SSH_DIR" ]
41+ then
42+ chmod 600 /var/lib/utah/.ssh/*
43+ chmod 700 /var/lib/utah/.ssh
44+ fi
45 }
46
47 usersetup

Subscribers

People subscribed via source and target branches