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
path: root/winsup
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
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')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/common.din1
-rw-r--r--winsup/cygwin/glob.cc1
-rw-r--r--winsup/cygwin/include/cygwin/version.h3
-rw-r--r--winsup/cygwin/release/1.7.352
-rw-r--r--winsup/cygwin/sec_auth.cc8
6 files changed, 20 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 4b7f1983c..d3e12470c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2015-03-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * 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.
+
2015-03-02 Corinna Vinschen <corinna@vinschen.de>
* security.cc (get_attribute_from_acl): Don't spill Everyone permissions
diff --git a/winsup/cygwin/common.din b/winsup/cygwin/common.din
index 17538ffbe..42098ff30 100644
--- a/winsup/cygwin/common.din
+++ b/winsup/cygwin/common.din
@@ -639,6 +639,7 @@ isnan NOSIGFE
isnanf NOSIGFE
isprint NOSIGFE
ispunct NOSIGFE
+issetugid NOSIGFE
isspace NOSIGFE
isupper NOSIGFE
iswalnum NOSIGFE
diff --git a/winsup/cygwin/glob.cc b/winsup/cygwin/glob.cc
index be2a6013b..b61436de1 100644
--- a/winsup/cygwin/glob.cc
+++ b/winsup/cygwin/glob.cc
@@ -103,7 +103,6 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/glob.c,v 1.28 2010/05/12 17:44:00 gordon Ex
#define getpwuid(uid) getpwuid32 (uid)
#define getuid() getuid32 ()
-#define issetugid() (cygheap->user.issetuid ())
#define CCHAR(c) (ignore_case_with_glob ? towlower (CHAR (c)) : CHAR (c))
#define Cchar(c) (ignore_case_with_glob ? towlower (c) : (c))
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index 01c9a761e..6dd690840 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -468,12 +468,13 @@ details. */
284: Export sockatmark.
285: Export wcstold.
285: Export cabsl, cimagl, creall, finitel, hypotl, sqrtl.
+ 287: Export issetugid.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 286
+#define CYGWIN_VERSION_API_MINOR 287
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible
diff --git a/winsup/cygwin/release/1.7.35 b/winsup/cygwin/release/1.7.35
index 500f19b67..51619f273 100644
--- a/winsup/cygwin/release/1.7.35
+++ b/winsup/cygwin/release/1.7.35
@@ -3,6 +3,8 @@ What's new:
- New APIs: cabsl, cimagl, creall, finitel, hypotl, sqrtl.
+- New API: issetugid.
+
What changed:
-------------
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