Skip to content

Commit

Permalink
Merge pull request #2203 from jenkinsci/jtnord-patch-1
Browse files Browse the repository at this point in the history
[FIX JENKINS-33978] Set file permissions on the file before writing the secret
  • Loading branch information
daniel-beck committed Apr 5, 2016
2 parents 37c00cf + 0dce38a commit 964e967
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/jenkins/install/SetupWizard.java
Expand Up @@ -79,8 +79,10 @@ public SetupWizard(Jenkins j) throws IOException, InterruptedException {
// JENKINS-33599 - write to a file in the jenkins home directory
// most native packages of Jenkins creates a machine user account 'jenkins' to run Jenkins,
// and use group 'jenkins' for admins. So we allo groups to read this file
iapf.write(randomUUID + System.lineSeparator(), "UTF-8");
iapf.touch(System.currentTimeMillis());
iapf.chmod(0640);
iapf.write(randomUUID + System.lineSeparator(), "UTF-8");


// Lock Jenkins down:
FullControlOnceLoggedInAuthorizationStrategy authStrategy = new FullControlOnceLoggedInAuthorizationStrategy();
Expand Down

0 comments on commit 964e967

Please sign in to comment.