Home
Search all pages
Subjects
By activity
Professions, Sciences, Humanities, Business, ...
User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...
Text Strings
Conversions, tests, processing, manipulation,...
Math
Integer, Floating point, Matrix, Statistics, Boolean, ...
Processing
Algorithms, Memory, Process control, Debugging, ...
Stored Data
Data storage, Integrity, Encryption, Compression, ...
Communications
Networks, protocols, Interprocess, Remote, Client Server, ...
Hard World Timing, Calendar and Clock, Audio, Video, Printer, Controls...
File System
Management, Filtering, File & Directory access, Viewers, ...
|
|
|
RocketLink!--> Man page versions:
OpenBSD
FreeBSD
Others
ISSETUGID(2) OpenBSD Programmer's Manual ISSETUGID(2)
NAME
issetugid - is current executable running setuid or setgid
SYNOPSIS
#include <unistd.h>
int
issetugid(void);
DESCRIPTION
The issetugid() function returns 1 if the process was made setuid or set-
gid as the result of the last or other previous execve() system calls.
Otherwise it returns 0.
This system call exists so that library routines (inside libtermlib,
libc, or other libraries) can guarantee safe behavior when used inside
setuid or setgid programs. Some library routines may be passed insuffi-
cient information and hence not know whether the current program was
started setuid or setgid because higher level calling code may have made
changes to the uid, euid, gid, or egid. Hence these low-level library
routines are unable to determine if they are being run with elevated or
normal privileges.
In particular, it is wise to use this call to determine if a pathname re-
turned from a getenv() call may safely be used to open() the specified
file. Quite often this is not wise because the status of the effective
uid is not known.
The issetugid() system call's result is unaffected by calls to setuid(),
setgid(), or other such calls. In case of a fork(), the child process
inherits the same status.
The status of issetugid() is only affected by execve(). If a child pro-
cess executes a new executable file, a new issetugid status will be de-
termined. This status is 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, the new process
will be considered issetugid.
ERRORS
The issetugid() function is always successful, and no return value is re-
served to indicate an error.
SEE ALSO
execve(2), setegid(2), seteuid(2), setgid(2), setuid(2)
HISTORY
The issetugid() function call first appeared in OpenBSD 2.0.
OpenBSD 2.6 August 25, 1996 1
Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts Institute of Technology, Free Software Foundation, FreeBSD Inc., and others. |
(Corrections, notes, and links courtesy of RocketAware.com)
Up to: Process Limits: Identity - Process ownership and Identity
RocketLink!--> Man page versions:
OpenBSD
FreeBSD
Others
Rapid-Links:
Search | About | Comments | Submit Path: RocketAware > man pages >
issetugid.2/
RocketAware.com is a service of Mib Software Copyright 1999, Forrest J. Cavalier III. All Rights Reserved. We welcome submissions and comments
|