errno errors reported as such.

master
Luka Vandervelden 2019-06-10 00:38:54 +02:00
parent 38329bb15e
commit 15aa28ea86
1 changed files with 4 additions and 7 deletions

View File

@ -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