Revision bf8dfda6
Added by Ohad Levy about 13 years ago
- ID bf8dfda678ec7e59053585c357a79df3b9d340cb
lib/proxy/dhcp/server/isc.rb | ||
---|---|---|
|
||
def omcmd cmd, msg=nil
|
||
if cmd == "connect"
|
||
@om = IO.popen("/bin/sh -c '/usr/bin/omshell 2>&1'", "r+")
|
||
if SETTINGS.dhcp_key_name and SETTINGS.dhcp_key_secret
|
||
args = "key #{SETTINGS.dhcp_key} #{SETTINGS.dhcp_key_secret}"
|
||
end
|
||
@om = IO.popen("/bin/sh -c '/usr/bin/omshell #{args} 2>&1'", "r+")
|
||
@om.puts "server #{name}"
|
||
@om.puts "connect"
|
||
@om.puts "new host"
|
||
... | ... | |
@om = nil # we cannot serialize an IO object, even if closed.
|
||
report msg, status
|
||
else
|
||
logger.debug "omshell: executed - #{cmd}"
|
||
logger.debug "omshell: executed - #{SETTINGS.dhcp_key_secret.nil? ? cmd : cmd.sub(SETTINGS.dhcp_key_secret,"[filtered]")}"
|
||
@om.puts cmd
|
||
end
|
||
end
|
Also available in: Unified diff
fixes #853 - If used with the proxy, the dhcpd server is open for connections from any server