su(user)
private
Changes the process’s uid and gid to the ones of user
Show source
def su(user)
if pw = Etc.getpwnam(user)
Process::initgroups(user, pw.gid)
Process::Sys::setgid(pw.gid)
Process::Sys::setuid(pw.uid)
else
warn("WEBrick::Utils::su doesn't work on this platform", uplevel: 1)
end
end