home *** CD-ROM | disk | FTP | other *** search
-
-
-
- SETUID(3) MINTLIB LIBRARY FUNCTIONS SETUID(3)
-
-
- N✓NA✓AM✓ME✓E
- setuid, setgid - set user and group IDs
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- #include <unistd.h>
-
- int setuid(int uid);
- int setgid(int gid);
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- setuid (setgid) is used to set the real user (group) ID
- and effective user (group) ID of the calling process.
-
- If the effective user ID of the calling process is super-
- user, the real user (group) ID and effective user (group)
- ID are set to uid (gid).
-
- If the effective user ID of the calling process is not
- super-user, but its real user (group) ID is equal to uid
- (gid), the effective user (group) ID is set to uid (gid).
-
- setuid (setgid) will fail if the real user (group) ID of
- the calling process is not equal to uid (gid) and its
- effective user ID is not super-user.
-
- R✓RE✓ET✓TU✓UR✓RN✓N V✓VA✓AL✓LU✓UE✓ES✓S
- 0 on success -1 on failure; errno is set to indicate the
- error.
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- g✓ge✓et✓tu✓ui✓id✓d(✓(3✓3)✓),✓, g✓ge✓et✓tg✓gi✓id✓d(✓(3✓3)✓),✓, g✓ge✓et✓te✓eu✓ui✓id✓d(✓(3✓3)✓),✓, g✓ge✓et✓te✓eg✓gi✓id✓d(✓(3✓3)✓),✓, P✓Ps✓se✓et✓tu✓ui✓id✓d(✓(2✓2)✓),✓,
- P✓Ps✓se✓et✓tg✓gi✓id✓d(✓(2✓2)✓)
-
- N✓NO✓OT✓TE✓ES✓S
- The related functions seteuid, setegid, setreuid and
- setregid are also available in the MiNTlibs but really are
- the same.
-
- B✓BU✓UG✓GS✓S
- When MiNT is not active, these calls are pretty bogus.
-
- Security in MiNT is a joke; don't rely on these calls to
- actually protect you from anything, it's more for informa-
- tional purposes.
-
-
-
-
-
-
-
-
-
-
-
-
-
- MiNT docs 0.1 3 March 1993 1
-
-
-