diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-08-01 05:26:04 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-08-01 05:26:04 +0000 |
commit | d080ea5049ab624c45e74ed1b12996f7aa19e674 (patch) | |
tree | 4cf94dd466f0fe7ea3488dd75f219fa8498bca39 /lib/libc | |
parent | 3c769e01f363665ee3fe35e97ca2703e892c5a74 (diff) |
Implemented _POSIX_SAVED_IDS behaviour according to 1003.1-1990, with
allowed extension from Appendix B, section 4.2.2.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/setuid.2 | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/libc/sys/setuid.2 b/lib/libc/sys/setuid.2 index deca532b388..b271097c84b 100644 --- a/lib/libc/sys/setuid.2 +++ b/lib/libc/sys/setuid.2 @@ -62,8 +62,11 @@ user IDs and the saved set-user-ID of the current process to the specified value. The .Fn setuid -function is permitted if the specified ID is equal to the real user ID -of the process, or if the effective user ID is that of the super user. +function is permitted if the effective user ID is that of the super user, +or if the specified user ID is the same as the effective user ID. If +not, but the specified user ID is the same as the real user ID, +.Fn setuid +will set the effective user ID to the real user ID. .Pp The .Fn setgid @@ -73,8 +76,11 @@ group IDs and the saved set-group-ID of the current process to the specified value. The .Fn setgid -function is permitted if the specified ID is equal to the real group ID -of the process, or if the effective user ID is that of the super user. +function is permitted if the effective user ID is that of the super user, +or if the specified group ID is the same as the effective group ID. If +not, but the specified group ID is the same as the real group ID, +.Fn setgid +will set the effective group ID to the real group ID. .Pp The .Fn seteuid @@ -109,10 +115,10 @@ The and .Fn setgid functions are compliant with the -.St -p1003.1-88 +.St -p1003.1-90 specification with .Li _POSIX_SAVED_IDS -not defined. +defined, with the extensions allowed in section B.4.2.2. The .Fn seteuid and |