Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src seteuid() and setegid() were adopted in IEEE Std 1003.1-2001...



details:   https://anonhg.NetBSD.org/src/rev/0e32ba34cd9b
branches:  trunk
changeset: 545672:0e32ba34cd9b
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Apr 14 08:12:11 2003 +0000

description:
seteuid() and setegid() were adopted in IEEE Std 1003.1-2001 + X/Open
portability guide issue 6, adjust headers to expose the function
prototypes with appropriate _POSIX_C_SOURCE/_XOPEN_SOURCE defines
fixes standards/21136 by MAEKAWA Masahide

diffstat:

 include/unistd.h      |  12 +++++++++---
 lib/libc/sys/setuid.2 |  14 +++-----------
 2 files changed, 12 insertions(+), 14 deletions(-)

diffs (58 lines):

diff -r 42081b2fb8a9 -r 0e32ba34cd9b include/unistd.h
--- a/include/unistd.h  Mon Apr 14 06:47:12 2003 +0000
+++ b/include/unistd.h  Mon Apr 14 08:12:11 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: unistd.h,v 1.88 2001/07/29 22:18:45 wiz Exp $  */
+/*     $NetBSD: unistd.h,v 1.89 2003/04/14 08:12:11 jdolecek Exp $     */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -161,6 +161,14 @@
 extern  int optopt;
 #endif
 
+/*
+ * IEEE Std 1003.1-2001, adopted in X/Open Portability Guide Issue 6 and later
+ */
+#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
+    (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600
+int     setegid __P((gid_t));
+int     seteuid __P((uid_t));
+#endif
 
 /*
  * The following three syscalls are also defined in <sys/types.h>
@@ -329,8 +337,6 @@
 int     rresvport __P((int *));
 int     ruserok __P((const char *, int, const char *, const char *));
 int     setdomainname __P((const char *, size_t));
-int     setegid __P((gid_t));
-int     seteuid __P((uid_t));
 int     setgroups __P((int, const gid_t *));
 int     sethostid __P((long));
 int     sethostname __P((const char *, size_t));
diff -r 42081b2fb8a9 -r 0e32ba34cd9b lib/libc/sys/setuid.2
--- a/lib/libc/sys/setuid.2     Mon Apr 14 06:47:12 2003 +0000
+++ b/lib/libc/sys/setuid.2     Mon Apr 14 08:12:11 2003 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: setuid.2,v 1.14 2003/01/18 11:33:13 thorpej Exp $
+.\"    $NetBSD: setuid.2,v 1.15 2003/04/14 08:12:12 jdolecek Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -124,13 +124,5 @@
 .Fn seteuid
 and
 .Fn setegid
-functions are extensions based on the
-.Tn POSIX
-concept of
-.Li _POSIX_SAVED_IDS ,
-and have been proposed for a future revision of the standard.
-They provide the same feature of toggling effective IDs as
-.Li _POSIX_SAVED_IDS ,
-but do so independent of the current effective
-ID, rather than requiring the super-user to permanently revoke its
-privileges.
+functions are compliant with the
+.St -p1003.1-2001 .



Home | Main Index | Thread Index | Old Index