Skip to content

Commit 0152256

Browse files
mdkentdanielsdeleo
authored andcommitted
CHEF-1099: Drop privileges after doing client setup, which includes reading
client.pem which is owned by root.
1 parent 8c6cc1d commit 0152256

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • chef-solr/lib/chef/solr/application

‎chef-solr/lib/chef/solr/application/solr.rb‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,14 @@ def setup_application
126126
@logfile = File.new(Chef::Config[:log_location], "a")
127127
end
128128

129-
Chef::Daemon.change_privilege
130129
Chef::Log.level = Chef::Config[:log_level]
131130

132131
# Build up a client
133132
c = Chef::Client.new
134133
c.build_node(nil, true)
135134

135+
Chef::Daemon.change_privilege
136+
136137
solr_base = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "..", "..", "solr"))
137138

138139
# Create the Jetty container

0 commit comments

Comments
 (0)