Bug #14189 ยป webrick_uplevel.patch
| lib/webrick/server.rb | ||
|---|---|---|
|
@shutdown_pipe = nil
|
||
|
unless @config[:DoNotListen]
|
||
|
if @config[:Listen]
|
||
|
warn(":Listen option is deprecated; use GenericServer#listen")
|
||
|
if RUBY_VERSION < "2.5"
|
||
|
warn(":Listen option is deprecated; use GenericServer#listen")
|
||
|
else
|
||
|
warn(":Listen option is deprecated; use GenericServer#listen", uplevel: 1)
|
||
|
end
|
||
|
end
|
||
|
listen(@config[:BindAddress], @config[:Port])
|
||
|
if @config[:Port] == 0
|
||
| lib/webrick/utils.rb | ||
|---|---|---|
|
Process::Sys::setgid(pw.gid)
|
||
|
Process::Sys::setuid(pw.uid)
|
||
|
else
|
||
|
warn("WEBrick::Utils::su doesn't work on this platform")
|
||
|
if RUBY_VERSION < "2.5"
|
||
|
warn("WEBrick::Utils::su doesn't work on this platform")
|
||
|
else
|
||
|
warn("WEBrick::Utils::su doesn't work on this platform", uplevel: 1)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
module_function :su
|
||