dns_one 0.4.65 → 0.4.66

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ac8c898ea2989e951b01a2dd940c71062535616
4
- data.tar.gz: cc2d29c74686c51680cf9e2e41e7c1eac054b1ab
3
+ metadata.gz: 6a317518731fd804e336e452ae503a5cacf27838
4
+ data.tar.gz: c12eb2433f38f99ee88de8e7ec166bf60086f1fd
5
5
  SHA512:
6
- metadata.gz: 65dffb016575c602362a24dde70431853887cbedbdfc7aeef334d2eb0a30d64888ed7d08e64872f62da7986af6f283988feac2f5c87087cf86f679d504c101bf
7
- data.tar.gz: e96e45e94038b94f1a446c629e637b00dccfe1df72bf676c1cb53cf6aa70042d2360514681a26a05e5e8adf09193ae08d51e27972ac17a94f26a8fe72c6f47ca
6
+ metadata.gz: c4951de33495c85c25ea307c114d0112c0b1bf3e5207a1fa57a54c7171ac98fe766a09a17274a4eddd5f5b6ecaa894934f87a999e571048b4142346a2e45fedf
7
+ data.tar.gz: 3e91c546a2982c20b307ce9e3322435a5c6bf6fa63d848e8901112e92cbfeb3a11d2dd4d597a4f9453347d11e01c6f3c75ea1bb8cb3718d0772b57b0408531b5
@@ -21,6 +21,7 @@ module DnsOne; class Server
21
21
  if conf[:log_result_socket]
22
22
  @log_result = {}
23
23
  @log_result_mutex = Mutex.new
24
+ launch_log_result_socket
24
25
  end
25
26
  end
26
27
 
@@ -43,9 +44,6 @@ module DnsOne; class Server
43
44
  stat = Stat.new if !stat
44
45
  end
45
46
  Log.i "Running as #{RExec.current_user}"
46
- if conf[:log_result_socket]
47
- launch_log_result_socket
48
- end
49
47
  end
50
48
 
51
49
  match(/(.+)/) do |t| # transaction
@@ -130,6 +128,12 @@ module DnsOne; class Server
130
128
  log_result = @log_result
131
129
  log_result_mutex = @log_result_mutex
132
130
  conf = @conf
131
+
132
+ if RExec.current_user == 'root'
133
+ run_as = conf[:run_as] || DEFAULT_RUN_AS
134
+ RExec.change_user run_as
135
+ end
136
+
133
137
  sock = Thread.new do
134
138
  begin
135
139
  Socket.unix_server_loop(conf[:log_result_socket_file] || DEFAULT_LOG_RESULT_SOCKET_FILE) do |sock, addr|
@@ -1,3 +1,3 @@
1
1
  module DnsOne
2
- VERSION = "0.4.65"
2
+ VERSION = "0.4.66"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dns_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.65
4
+ version: 0.4.66
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lobato