Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-03-03 15:58:34 +0300
committerCorinna Vinschen <corinna@vinschen.de>2015-03-03 15:58:34 +0300
commit37e87b843f727564128ed4438d6052e892d31804 (patch)
treece8a965e1325693c82a87c4d6f68bd9bf0bf4b35 /winsup/cygwin/sec_auth.cc
parentf9f1fbe47e641a3bcc4c53676ed7148dc74bf69c (diff)
* common.din (issetugid): Export.
* glob.cc (issetugid): Drop macro. * sec_auth.cc (issetugid): New exported function. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
Diffstat (limited to 'winsup/cygwin/sec_auth.cc')
-rw-r--r--winsup/cygwin/sec_auth.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc
index 78d47cb76..37b53c643 100644
--- a/winsup/cygwin/sec_auth.cc
+++ b/winsup/cygwin/sec_auth.cc
@@ -31,6 +31,14 @@ details. */
#include "cygserver_setpwd.h"
#include <cygwin/version.h>
+/* OpenBSD 2.0 and later. */
+extern "C"
+int
+issetugid (void)
+{
+ return cygheap->user.issetuid () ? 1 : 0;
+}
+
/* Starting with Windows Vista, the token returned by system functions
is a restricted token. The full admin token is linked to it and can
be fetched with NtQueryInformationToken. This function returns the original