euid=(p1)
public
Sets the effective user ID for this process. Not available on all
platforms.
Show source
/*
* call-seq:
* Process.euid= integer
*
* Sets the effective user ID for this process. Not available on all
* platforms.
*/
static VALUE
proc_seteuid(obj, euid)
VALUE obj, euid;
{
check_uid_switch();
if (setresuid(-1, NUM2INT(euid), -1) < 0) rb_sys_fail(0);
if (setreuid(-1, NUM2INT(euid)) < 0) rb_sys_fail(0);
if (seteuid(NUM2INT(euid)) < 0) rb_sys_fail(0);
euid = NUM2INT(euid);
if (euid == getuid()) {
if (setuid(euid) < 0) rb_sys_fail(0);
}
else {
rb_notimplement();
}
rb_notimplement();
return euid;
}