* security.cc (alloc_sd): Carefully check owner_sid again after trying
SIDs from cygheap.
This commit is contained in:
parent
dd0208eb34
commit
49056987f1
@ -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>
|
2002-06-21 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* security.cc (alloc_sd): Remove unnecessary retrieval of owner name.
|
* security.cc (alloc_sd): Remove unnecessary retrieval of owner name.
|
||||||
|
@ -1368,13 +1368,13 @@ alloc_sd (__uid32_t uid, __gid32_t gid, int attribute,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get SID of owner. */
|
/* Get SID of owner. */
|
||||||
cygsid owner_sid;
|
cygsid owner_sid (NO_SID);
|
||||||
/* Check for current user first */
|
/* Check for current user first */
|
||||||
if (uid == myself->uid)
|
if (uid == myself->uid)
|
||||||
owner_sid = cygheap->user.sid ();
|
owner_sid = cygheap->user.sid ();
|
||||||
else if (uid == cygheap->user.orig_uid)
|
else if (uid == cygheap->user.orig_uid)
|
||||||
owner_sid = cygheap->user.orig_sid ();
|
owner_sid = cygheap->user.orig_sid ();
|
||||||
else
|
if (!owner_sid)
|
||||||
{
|
{
|
||||||
/* Otherwise retrieve user data from /etc/passwd */
|
/* Otherwise retrieve user data from /etc/passwd */
|
||||||
struct passwd *pw = getpwuid32 (uid);
|
struct passwd *pw = getpwuid32 (uid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user