issetugid man page on OpenDarwin

Man page or keyword search:  
man Server   3202 pages
apropos Keyword Search (all sections)
Output format
OpenDarwin logo
[printable version]

ISSETUGID(2)		    BSD System Calls Manual		  ISSETUGID(2)

     issetugid — is current executable running setuid or setgid

     #include <unistd.h>


     The issetugid() function returns 1 if the process was made setuid or set‐
     gid as the result of the last execve() system call.  Otherwise it returns

     This system call exists so that library routines (inside libc,
     libtermlib, or other libraries) can gaurantee safe behavior when used
     inside setuid or setgid programs.	Some library routines may not be
     passed sufficient information to know if the current program was started
     setuid or setgid because higher level calling code may have made changes
     to the uid or the euid.  In particular, it is wise to use this call to
     determine if a pathname returned from a getenv() call may safely be used
     to open() the specified file.

     issetugid() is unaffected by calls to setuid(), fork(), and other such
     calls.  It is only controlled by execve().

     The issetugid() function is always successful, and no return value is
     reserved to indicate an error.

     execve(2), setuid(2), seteuid(2,) setgid(2), setegid(2)

     A lstat() function call appeared in OpenBSD 2.0

OpenBSD 2.0			August, 25 1996			   OpenBSD 2.0

List of man pages available for OpenDarwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net