When writing the ~/.ssh/authorized_keys file in a script that is being run as 
sudo, the file is created with the root owner, instead of the user defined by 
the node credentials. File ownership should be enforced to make sure the right 
owner is always set.

This will require changes to jclouds-labs to align existing classes to the new 
interface.

@ritazh Could you test this with the azurecompute-arm provider?

I've just opened this now to get early feedback. I still have to run several 
live tests before merging.
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/971

-- Commit Summary --

  * Properly set the permissions in the ~/.ssh folder

-- File Changes --

    M 
compute/src/main/java/org/jclouds/compute/config/BaseComputeServiceContextModule.java
 (3)
    R 
compute/src/main/java/org/jclouds/compute/functions/InstallKeysAndRunScript.java
 (12)
    A 
compute/src/main/java/org/jclouds/compute/functions/NodeAndTemplateOptionsToStatement.java
 (40)
    R 
compute/src/main/java/org/jclouds/compute/functions/NodeAndTemplateOptionsToStatementWithoutPublicKey.java
 (17)
    M 
compute/src/main/java/org/jclouds/compute/strategy/CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java
 (14)
    R 
compute/src/test/java/org/jclouds/compute/functions/NodeAndTemplateOptionsToStatementWithoutPublicKeyTest.java
 (21)
    M 
compute/src/test/java/org/jclouds/compute/strategy/CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMapTest.java
 (11)
    M compute/src/test/resources/initscript_with_java.sh (1)
    M compute/src/test/resources/initscript_with_jetty.sh (1)
    M compute/src/test/resources/runscript_adminUpdate.sh (1)
    M 
providers/digitalocean2/src/main/java/org/jclouds/digitalocean2/compute/config/DigitalOcean2ComputeServiceContextModule.java
 (6)
    M 
scriptbuilder/src/main/java/org/jclouds/scriptbuilder/statements/login/UserAdd.java
 (2)
    M 
scriptbuilder/src/main/java/org/jclouds/scriptbuilder/statements/ssh/AuthorizeRSAPublicKeys.java
 (16)
    M 
scriptbuilder/src/test/java/org/jclouds/scriptbuilder/statements/login/UserAddTest.java
 (2)
    M 
scriptbuilder/src/test/java/org/jclouds/scriptbuilder/statements/ssh/AuthorizeRSAPublicKeyTest.java
 (28)
    M scriptbuilder/src/test/resources/test_adminaccess_flipped.sh (1)
    M scriptbuilder/src/test/resources/test_adminaccess_params.sh (1)
    M scriptbuilder/src/test/resources/test_adminaccess_params_and_fullname.sh 
(1)
    M scriptbuilder/src/test/resources/test_adminaccess_plainuser.sh (1)
    M scriptbuilder/src/test/resources/test_adminaccess_standard.sh (1)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/971.patch
https://github.com/jclouds/jclouds/pull/971.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/971

Reply via email to