summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-11-30 22:42:58 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-11-30 22:42:58 +0000
commit1b96a7943e018bf0452be3dcf149ffc348caf030 (patch)
tree264296a6bf2b93fd8415be95a16189f27fcd9075
parentff831e7be50a6e2e6bf9256e12d24eb4b1385a64 (diff)
Fix a minor documentation bug: When given the old real ID unchanged,
it is assigned to the saved ID even if no new effective ID is given, but the existing effective ID differs from the saved ID. Update STANDARDS and purge the redundant CAVEATS section. OK millert@ jmc@, no objections from tedu@
-rw-r--r--lib/libc/sys/setregid.229
-rw-r--r--lib/libc/sys/setreuid.229
2 files changed, 18 insertions, 40 deletions
diff --git a/lib/libc/sys/setregid.2 b/lib/libc/sys/setregid.2
index 0d7aedc1a20..9df9e17b405 100644
--- a/lib/libc/sys/setregid.2
+++ b/lib/libc/sys/setregid.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: setregid.2,v 1.8 2013/07/17 05:42:11 schwarze Exp $
+.\" $OpenBSD: setregid.2,v 1.9 2014/11/30 22:42:57 schwarze Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)setregid.2 8.2 (Berkeley) 4/16/94
.\"
-.Dd $Mdocdate: July 17 2013 $
+.Dd $Mdocdate: November 30 2014 $
.Dt SETREGID 2
.Os
.Sh NAME
@@ -45,7 +45,7 @@ are set according to the arguments.
The saved group ID will be set to the new value of the real group
ID if a real group ID is specified and either
the new real group ID value is different from the current value
-or the effective group ID is changed to a value other than the
+or the new value of the effective group ID differs from the
current saved group ID.
.Pp
Unprivileged users may change either group ID to the current value
@@ -90,28 +90,17 @@ was specified.
The
.Fn setregid
function conforms to the
-.St -p1003.1-2001
-and
-.St -xpg4.3
-specifications.
+.St -p1003.1-2008
+specification, except that the conditions for changing the saved
+group ID differ and that, if it is changed, the saved group ID
+is set to the real group ID instead of the effective group ID.
.Sh HISTORY
The
.Fn setregid
system call first appeared in
-.Bx 4.1c .
+.Bx 4.1c ,
+predating POSIX.
A semantically different version appeared in
.Bx 4.4 .
The current version, with the original semantics restored, appeared in
.Ox 3.3 .
-.Sh CAVEATS
-The
-.Fn setregid
-function predates
-.Tn POSIX
-saved group IDs.
-This implementation changes the saved group ID to the new value of
-the real group ID only if the real group ID is specified and either
-changed
-or the effective group ID is changed to a value other than the current
-saved group ID.
-Other implementations may behave differently.
diff --git a/lib/libc/sys/setreuid.2 b/lib/libc/sys/setreuid.2
index e4ebb4b56a0..8497ce847fb 100644
--- a/lib/libc/sys/setreuid.2
+++ b/lib/libc/sys/setreuid.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: setreuid.2,v 1.9 2013/07/17 05:42:11 schwarze Exp $
+.\" $OpenBSD: setreuid.2,v 1.10 2014/11/30 22:42:57 schwarze Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)setreuid.2 8.2 (Berkeley) 4/16/94
.\"
-.Dd $Mdocdate: July 17 2013 $
+.Dd $Mdocdate: November 30 2014 $
.Dt SETREUID 2
.Os
.Sh NAME
@@ -45,7 +45,7 @@ current process are set according to the arguments.
The saved user ID will be set to the new value of the real
user ID if a real user ID is specified and either
the new real user ID value is different from the current value
-or the effective user ID is changed to a value other than the
+or the new value of the effective user ID differs from the
current saved user ID.
.Pp
Unprivileged users may change either user ID to the current value
@@ -90,28 +90,17 @@ was specified.
The
.Fn setreuid
function conforms to the
-.St -p1003.1-2001
-and
-.St -xpg4.3
-specifications.
+.St -p1003.1-2008
+specification, except that the conditions for changing the saved
+user ID differ and that, if it is changed, the saved user ID
+is set to the real user ID instead of the effective user ID.
.Sh HISTORY
The
.Fn setreuid
system call first appeared in
-.Bx 4.1c .
+.Bx 4.1c ,
+predating POSIX.
A semantically different version appeared in
.Bx 4.4 .
The current version, with the original semantics restored, appeared in
.Ox 3.3 .
-.Sh CAVEATS
-The
-.Fn setreuid
-function predates
-.Tn POSIX
-saved user IDs.
-This implementation changes the saved user ID to the new value of
-the real user ID only if the real user ID is specified and either
-changed
-or the effective user ID is changed to a value other than the current
-saved user ID.
-Other implementations may behave differently.