errno errors reported as such.
This commit is contained in:
parent
38329bb15e
commit
15aa28ea86
@ -25,14 +25,11 @@ module System
|
||||
|
||||
passwd = pointer.value
|
||||
|
||||
# FIXME: Probably should get some errno magic right now.
|
||||
if 0 != LibC.setuid passwd.pw_uid
|
||||
raise Exception.new "setuid failed"
|
||||
end
|
||||
r = LibC.setgid passwd.pw_gid
|
||||
raise Errno.new "setgid" if r != 0
|
||||
|
||||
if 0 != LibC.setgid passwd.pw_gid
|
||||
raise Exception.new "setuid failed"
|
||||
end
|
||||
r = LibC.setuid passwd.pw_uid
|
||||
raise Errno.new "setuid" if r != 0
|
||||
|
||||
passwd
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user