metasploit-framework/lib/rex/post/process.rb

53 lines
699 B
Ruby

#!/usr/bin/ruby
module Rex
module Post
class Process
private_class_method :new
def Process.getresuid
raise NotImplementedError
end
def Process.setresuid(a, b, c)
raise NotImplementedError
end
def Process.euid
getresuid()[1]
end
def Process.euid=(id)
setresuid(-1, id, -1)
end
def Process.uid
getresuid()[0]
end
def Process.uid=(id)
setresuid(id, -1, -1)
end
def Process.egid
getresgid()[1]
end
def Process.egid=(id)
setresgid(-1, id, -1)
end
def Process.gid
getresgid()[0]
end
def Process.gid=(id)
setresgid(id, -1, -1)
end
def Process.pid
raise NotImplementedError
end
def Process.ppid
raise NotImplementedError
end
end
end; end # Post/Rex