|
|
HP-UX Reference > Sseteuid(2)HP-UX 11i Version 2: December 2007 Update |
|
NAMEseteuid(), setegid() — set effective user and group IDs DESCRIPTIONTo use these functions, compile with the option -I/usr/include/ep and link in the libcext library by specifying -lcext, for example: cc -I/usr/include/ep [flag]... cfile[...] -lcext [...] seteuid() sets the effective user ID of the calling process, if euid is equal to the current real or saved user ID, or if the process has appropriate privileges. The real user ID and saved set-user-ID remain unchanged. setegid() sets the effective group ID of the calling process, if egid is equal to the current real or saved group ID, or if the process has appropriate privileges. The real group ID, saved set-group-ID and any supplementary group IDs remain unchanged. RETURN VALUEUpon successful completion, seteuid() and setegid() return 0. Otherwise, they return -1 and set errno to indicate the error. ERRORSseteuid() and setegid() fail if any of the following conditions are encountered:
WARNINGSUsers of seteuid() and setegid() should note that the libcext library will not be available in future releases of HP-UX. However these functions will be available as part of the C library libc. SEE ALSOexec(2), getegid(2), geteuid(2), getuid(2), setregid(2), setresgid(2), setresuid(2), setreuid(2), setuid(2). |
|