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