diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-06-21 12:57:19 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-06-21 12:57:19 +0000 |
commit | 49056987f1c719121fe15fffb72ad5085bac76e8 (patch) | |
tree | e7069c7163708e29400e0845e9b9b9434322041f /winsup/cygwin/security.cc | |
parent | dd0208eb34be4a5cc1cd6377d43c3dfba1736bdf (diff) | |
download | cygnal-49056987f1c719121fe15fffb72ad5085bac76e8.tar.gz cygnal-49056987f1c719121fe15fffb72ad5085bac76e8.tar.bz2 cygnal-49056987f1c719121fe15fffb72ad5085bac76e8.zip |
* security.cc (alloc_sd): Carefully check owner_sid again after trying
SIDs from cygheap.
Diffstat (limited to 'winsup/cygwin/security.cc')
-rw-r--r-- | winsup/cygwin/security.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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); |