setresuid(p1, p2, p3)
public
Sets the (integer) real, effective, and saved user IDs of the current
process to rid, eid, and sid respectively. A
value of -1 for any value means to leave that ID unchanged. Not
available on all platforms.
Show source
/*
* call-seq:
* Process::Sys.setresuid(rid, eid, sid) => nil
*
* Sets the (integer) real, effective, and saved user IDs of the
* current process to _rid_, _eid_, and _sid_ respectively. A
* value of <code>-1</code> for any value means to
* leave that ID unchanged. Not available on all platforms.
*
*/
static VALUE
p_sys_setresuid(obj, rid, eid, sid)
VALUE obj, rid, eid, sid;
{
#if defined HAVE_SETRESUID
check_uid_switch();
if (setresuid(NUM2INT(rid),NUM2INT(eid),NUM2INT(sid)) != 0) rb_sys_fail(0);
#else
rb_notimplement();
#endif
return Qnil;
}