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 +4 -4
- data/lib/dns_one/server.rb +7 -3
- data/lib/dns_one/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a317518731fd804e336e452ae503a5cacf27838
|
4
|
+
data.tar.gz: c12eb2433f38f99ee88de8e7ec166bf60086f1fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4951de33495c85c25ea307c114d0112c0b1bf3e5207a1fa57a54c7171ac98fe766a09a17274a4eddd5f5b6ecaa894934f87a999e571048b4142346a2e45fedf
|
7
|
+
data.tar.gz: 3e91c546a2982c20b307ce9e3322435a5c6bf6fa63d848e8901112e92cbfeb3a11d2dd4d597a4f9453347d11e01c6f3c75ea1bb8cb3718d0772b57b0408531b5
|
data/lib/dns_one/server.rb
CHANGED
@@ -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|
|
data/lib/dns_one/version.rb
CHANGED