do_setresgid man page on NetBSD

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

DO_SETRESUID(9)		 BSD Kernel Developer's Manual	       DO_SETRESUID(9)

NAME
     do_setresuid, do_setresgid — set process uid and gid

SYNOPSIS
     #include <sys/ucred.h>

     int
     do_setresuid(struct lwp *lwp, uid_t ruid, uid_t euid, uid_t svuid,
	 u_int flags);

     int
     do_setresgid(struct lwp *lwp, uid_t ruid, uid_t euid, uid_t svuid,
	 u_int flags);

DESCRIPTION
     The do_setresuid and do_setresgid functions are used to implement the
     various system calls that allow a process to change its real, effective,
     and saved uid and gid values.

     The do_setresuid function sets the specified processes real user ID to
     ruid, its effective user ID to euid, and its saved user ID to svuid.  If
     any of the uid arguments are -1 then that assignment is skipped.

     If suser() is true, then any values may be assigned, otherwise the new
     uid values must match one of the existing values and the caller must have
     set the relevant bit in flags.

     The flags argument specifies which of the existing uid values the new
     value must match.	It should be set to a logical OR of
     ID_{R,E,S}_EQ_{R,E,S}, where ID_E_EQ_R means that it is valid to set the
     effective ID to the current value of the real ID.

     The do_setresgid function sets the group IDs but otherwise behaves in the
     same manner as do_setresuid.  The processes group list is neither exam‐
     ined nor effected.

SEE ALSO
     setregid(2), setreuid(2), setuid(2), suser(9)

CODE REFERENCES
     These functions are implemented in: sys/kern/kern_prot.c.

HISTORY
     Implemented for NetBSD 2.0 to replace ad-hoc code in each system call
     routine and in the various compat modules.

BSD			      September 28, 2003			   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

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]
Tweet
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