/* Dropping uid/gid privileges of the current process temporarily.
- Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# if HAVE_SETRESGID /* glibc, FreeBSD, OpenBSD, HP-UX */
if (setresgid (-1, gid, saved_gid) < 0)
return -1;
-# else /* MacOS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
+# else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
if (setregid (-1, gid) < 0)
return -1;
# endif
figure 14. */
if (setresuid (-1, uid, saved_uid) < 0)
return -1;
-# else /* MacOS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
+# else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
if (setreuid (-1, uid) < 0)
return -1;
# endif
figure 14. */
if (setresuid (-1, saved_uid, -1) < 0)
return -1;
-# else /* MacOS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
+# else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
if (setreuid (-1, saved_uid) < 0)
return -1;
# endif
# if HAVE_SETRESGID /* glibc, FreeBSD, OpenBSD, HP-UX */
if (setresgid (-1, saved_gid, -1) < 0)
return -1;
-# else /* MacOS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
+# else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
if (setregid (-1, saved_gid) < 0)
return -1;
# endif