You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ke...@apache.org on 2013/06/18 16:40:46 UTC

git commit: updated refs/heads/4.1 to 025f682

Updated Branches:
  refs/heads/4.1 c2f0a2f6d -> 025f682e9


CLOUDSTACK-3054 - Have ssh key initscript handle SELinux permissions


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/025f682e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/025f682e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/025f682e

Branch: refs/heads/4.1
Commit: 025f682e93edd662a0867bebbfc089039922df86
Parents: c2f0a2f
Author: Ian Service <is...@ts2.ca>
Authored: Tue Jun 18 10:39:31 2013 -0400
Committer: David Nalley <da...@gnsa.us>
Committed: Tue Jun 18 10:40:34 2013 -0400

----------------------------------------------------------------------
 setup/bindir/cloud-set-guest-sshkey.in | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/025f682e/setup/bindir/cloud-set-guest-sshkey.in
----------------------------------------------------------------------
diff --git a/setup/bindir/cloud-set-guest-sshkey.in b/setup/bindir/cloud-set-guest-sshkey.in
index 15008b8..f3f02b1 100755
--- a/setup/bindir/cloud-set-guest-sshkey.in
+++ b/setup/bindir/cloud-set-guest-sshkey.in
@@ -71,6 +71,7 @@ fi
 homedir=$(grep ^$user /etc/passwd|awk -F ":" '{print $6}')
 sshdir=$homedir/.ssh
 authorized=$sshdir/authorized_keys
+restorecon=/sbin/restorecon
 
 
 if [ ! -e $sshdir ]
@@ -86,6 +87,10 @@ fi
 cat $authorized|grep -v "$publickey" > $authorized
 echo "$publickey" >> $authorized
 
+if [ -e $restorecon ]
+then
+    $restorecon -R -v $sshdir
+fi
 
 exit 0