summaryrefslogtreecommitdiff
path: root/chef-solr
diff options
context:
space:
mode:
authorMatthew Kent <mkent@magoazul.com>2010-04-05 00:19:06 -0700
committerDaniel DeLeo <dan@opscode.com>2010-04-30 15:04:32 -0700
commit0152256a2ff577000340eb8af772776ff7dc3b72 (patch)
treeb7e249b54940c28fc60c52564656109eab73c726 /chef-solr
parent8c6cc1dfd88a201be4988fa23f223321be224236 (diff)
downloadchef-0152256a2ff577000340eb8af772776ff7dc3b72.tar.gz
CHEF-1099: Drop privileges after doing client setup, which includes reading
client.pem which is owned by root.
Diffstat (limited to 'chef-solr')
-rw-r--r--chef-solr/lib/chef/solr/application/solr.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/chef-solr/lib/chef/solr/application/solr.rb b/chef-solr/lib/chef/solr/application/solr.rb
index f76618243e..4632102251 100644
--- a/chef-solr/lib/chef/solr/application/solr.rb
+++ b/chef-solr/lib/chef/solr/application/solr.rb
@@ -126,13 +126,14 @@ class Chef
@logfile = File.new(Chef::Config[:log_location], "a")
end
- Chef::Daemon.change_privilege
Chef::Log.level = Chef::Config[:log_level]
# Build up a client
c = Chef::Client.new
c.build_node(nil, true)
+ Chef::Daemon.change_privilege
+
solr_base = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "..", "..", "solr"))
# Create the Jetty container