* security.cc (alloc_sd): Carefully check owner_sid again after trying

SIDs from cygheap.
This commit is contained in:
Corinna Vinschen 2002-06-21 12:57:19 +00:00
parent dd0208eb34
commit 49056987f1
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -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);