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>2002-06-21 16:57:19 +0400
committerCorinna Vinschen <corinna@vinschen.de>2002-06-21 16:57:19 +0400
commit49056987f1c719121fe15fffb72ad5085bac76e8 (patch)
treee7069c7163708e29400e0845e9b9b9434322041f
parentdd0208eb34be4a5cc1cd6377d43c3dfba1736bdf (diff)
* security.cc (alloc_sd): Carefully check owner_sid again after trying
SIDs from cygheap.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/security.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index e60fe8438..afcfcece7 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2002-06-21 Corinna Vinschen <corinna@vinschen.de>
+ * security.cc (alloc_sd): Carefully check owner_sid again after trying
+ SIDs from cygheap.
+
+2002-06-21 Corinna Vinschen <corinna@vinschen.de>
+
* security.cc (alloc_sd): Remove unnecessary retrieval of owner name.
Check uid for current user first and use SIDs from cygheap if so.
Set errno to EINVAL if user SID isn't retrievable. Just print user SID
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc
index 3cd0588d8..60b5378f3 100644
--- a/winsup/cygwin/security.cc
+++ b/winsup/cygwin/security.cc
@@ -1368,13 +1368,13 @@ alloc_sd (__uid32_t uid, __gid32_t gid, int attribute,
}
/* Get SID of owner. */
- cygsid owner_sid;
+ cygsid owner_sid (NO_SID);
/* Check for current user first */
if (uid == myself->uid)
owner_sid = cygheap->user.sid ();
else if (uid == cygheap->user.orig_uid)
owner_sid = cygheap->user.orig_sid ();
- else
+ if (!owner_sid)
{
/* Otherwise retrieve user data from /etc/passwd */
struct passwd *pw = getpwuid32 (uid);