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:
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