IPB
>  Man Pages > Unix > Solaris 10 11/06 > Section 2 > issetugid man page

issetugid man page

Section 2 - Solaris 10 11/06 Man Pages

Other operating system man pages available here


Advanced Search

Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!





System Calls                                         issetugid(2)



NAME
     issetugid -  determine  if  current  executable  is  running
     setuid or setgid

SYNOPSIS
     #include <unistd.h>

     int issetugid(void);

DESCRIPTION
     The issetugid() function enables library functions (in  lib-
     termlib,   libc,  or  other  libraries)  to  guarantee  safe
     behavior when used in setuid or setgid programs or  programs
     that  run  with  more  privileges after a succesful exec(2).
     Some library functions might be passed insufficient informa-
     tion  and  not  know whether the current program was started
     setuid or setgid because a higher level calling  code  might
     have  made  changes  to  the  uid, euid, gid, or egid. These
     low-level library functions are therefore unable  to  deter-
     mine   if  they  are  being  run  with  elevated  or  normal
     privileges.

     The issetugid() function should be used to  determine  if  a
     path name returned from a getenv(3C) call can be used safely
     to open the specified file. It is often  not  safe  to  open
     such  a  file because the status of the effective uid is not
     known.

     The result of a call to issetugid() is unaffected  by  calls
     to  setuid(),  setgid(),  or other such calls.  In case of a
     call to fork(2), the child process inherits the same status.

     The status of issetugid() is affected only by execve()  (see
     exec(2)). If a child process executes a new executable file,
     a new issetugid() status  will  be  based  on  the  existing
     process's  uid,  euid,  gid, and egid permissions and on the
     modes of the executable file. If  the  new  executable  file
     modes  are  setuid  or setgid, or if the existing process is
     executing the new image with uid != euid or gid != egid,  or
     if the permitted set before the call to the exec function is
     not a superset of the inheritable set at that time,  issetu-
     gid() returns 1 in the new process.

RETURN VALUES
     The issetugid() function returns 1 if the process  was  made
     setuid  or  setgid  as  the result of the last or a previous
     call to execve(). Otherwise it returns 0.

ERRORS
     The issetugid() function is  always  successful.  No  return
     value is reserved to indicate an error.




SunOS 5.10          Last change: 19 Feb 2003                    1






System Calls                                         issetugid(2)



ATTRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Interface Stability         | Evolving                    |
    |_____________________________|_____________________________|
    | MT-Level                    | Async-Signal-Safe           |
    |_____________________________|_____________________________|


SEE ALSO
     exec(2),  fork(2),  setuid(2),  getenv(3C),   attributes(5),
     privileges(5)







































SunOS 5.10          Last change: 19 Feb 2003                    2





Man(1) output converted with man2html and wrapped by fishsponge

This page was generated on Wed Sep 12 11:27:01 GMT 2007

Your favourite pages:

No pages logged yet.
Trying to save cookie...

Top 10 most popular pages:

sqlite3 man page (5323 hits)
(openSUSE 10.2)

svn man page (5164 hits)
(FreeBSD 6.2)

adv_cap_autoneg man page (4865 hits)
(Solaris 10 11_06)

CPAN man page (4602 hits)
(Suse Linux 10.1)

ssh man page (4337 hits)
(Suse Linux 10.1)

ssh-socks5-proxy-connect man page (2839 hits)
(Solaris 10 11_06)

netcat man page (2687 hits)
(Suse Linux 10.1)

pprosetup man page (2472 hits)
(Solaris 10 11_06)

startproc man page (2452 hits)
(Suse Linux 10.1)

signal man page (2393 hits)
(Suse Linux 10.1)

Useful Links

Go Back

Visitor Statistics


Valid XHTML 1.0 Transitional     Valid CSS!

Partners: Cambridge Plus :: Pyrenees Mountain Holidays Contact Us :: Server Room Temperature Monitor :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum