2010-02-26 Pierre Humblet <Pierre.Humblet@ieee.org>
* security.cc (check_access): Use user.imp_token if appropriate. Set errno and return if DuplicateTokenEx fails .
This commit is contained in:
parent
e5ddf94aa1
commit
a90dc29d18
@ -1,3 +1,8 @@
|
|||||||
|
2010-02-26 Pierre Humblet <Pierre.Humblet@ieee.org>
|
||||||
|
|
||||||
|
* security.cc (check_access): Use user.imp_token if appropriate.
|
||||||
|
Set errno and return if DuplicateTokenEx fails .
|
||||||
|
|
||||||
2010-02-26 Corinna Vinschen <corinna@vinschen.de>
|
2010-02-26 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
Remove all traces of __CYGWIN_USE_BIG_TYPES__.
|
Remove all traces of __CYGWIN_USE_BIG_TYPES__.
|
||||||
|
@ -751,16 +751,17 @@ check_access (security_descriptor &sd, GENERIC_MAPPING &mapping,
|
|||||||
? cygheap->user.imp_token ()
|
? cygheap->user.imp_token ()
|
||||||
: hProcImpToken);
|
: hProcImpToken);
|
||||||
|
|
||||||
if (!tok && !DuplicateTokenEx (hProcToken, MAXIMUM_ALLOWED, NULL,
|
if (!tok)
|
||||||
|
{
|
||||||
|
if (!DuplicateTokenEx (hProcToken, MAXIMUM_ALLOWED, NULL,
|
||||||
SecurityImpersonation, TokenImpersonation,
|
SecurityImpersonation, TokenImpersonation,
|
||||||
&hProcImpToken))
|
&hProcImpToken))
|
||||||
#ifdef DEBUGGING
|
{
|
||||||
system_printf ("DuplicateTokenEx failed, %E");
|
__seterrno ();
|
||||||
#else
|
return ret;
|
||||||
syscall_printf ("DuplicateTokenEx failed, %E");
|
}
|
||||||
#endif
|
|
||||||
else
|
|
||||||
tok = hProcImpToken;
|
tok = hProcImpToken;
|
||||||
|
}
|
||||||
|
|
||||||
if (!AccessCheck (sd, tok, desired, &mapping, pset, &plen, &granted, &status))
|
if (!AccessCheck (sd, tok, desired, &mapping, pset, &plen, &granted, &status))
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user