setuid?()
public
Returns true if stat has the set-user-id permission bit set, false
if it doesn’t or if the operating system doesn’t support this feature.
File.stat("/bin/su").setuid?
Show source
/*
* call-seq:
* stat.setuid? => true or false
*
* Returns <code>true</code> if <i>stat</i> has the set-user-id
* permission bit set, <code>false</code> if it doesn't or if the
* operating system doesn't support this feature.
*
* File.stat("/bin/su").setuid?
*/
static VALUE
rb_stat_suid(obj)
VALUE obj;
{
#ifdef S_ISUID
if (get_stat(obj)->st_mode & S_ISUID) return Qtrue;
#endif
return Qfalse;
}