From 37e87b843f727564128ed4438d6052e892d31804 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 3 Mar 2015 12:58:34 +0000 Subject: * 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. --- winsup/cygwin/sec_auth.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'winsup/cygwin/sec_auth.cc') 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 +/* 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 -- cgit v1.2.3