* security.cc (create_token): Use sec_user() to create
SECURITY_ATTRIBUTES structure for primary token.
This commit is contained in:
parent
adbd01afe4
commit
f6fc31e1a9
|
@ -1,3 +1,8 @@
|
||||||
|
2002-01-23 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* security.cc (create_token): Use sec_user() to create
|
||||||
|
SECURITY_ATTRIBUTES structure for primary token.
|
||||||
|
|
||||||
2002-01-23 Corinna Vinschen <corinna@vinschen.de>
|
2002-01-23 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* path.cc (symlink): Fix check for already existing file.
|
* path.cc (symlink): Fix check for already existing file.
|
||||||
|
|
|
@ -710,7 +710,7 @@ create_token (cygsid &usersid, cygsid &pgrpsid)
|
||||||
{ sizeof sqos, SecurityImpersonation, SECURITY_STATIC_TRACKING, FALSE };
|
{ sizeof sqos, SecurityImpersonation, SECURITY_STATIC_TRACKING, FALSE };
|
||||||
OBJECT_ATTRIBUTES oa =
|
OBJECT_ATTRIBUTES oa =
|
||||||
{ sizeof oa, 0, 0, 0, 0, &sqos };
|
{ sizeof oa, 0, 0, 0, 0, &sqos };
|
||||||
SECURITY_ATTRIBUTES sa = { sizeof sa, NULL, TRUE };
|
char sa_buf[1024];
|
||||||
LUID auth_luid = SYSTEM_LUID;
|
LUID auth_luid = SYSTEM_LUID;
|
||||||
LARGE_INTEGER exp = { QuadPart:0x7fffffffffffffffLL };
|
LARGE_INTEGER exp = { QuadPart:0x7fffffffffffffffLL };
|
||||||
|
|
||||||
|
@ -827,9 +827,8 @@ create_token (cygsid &usersid, cygsid &pgrpsid)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert to primary token. */
|
/* Convert to primary token. */
|
||||||
if (!DuplicateTokenEx (token, TOKEN_ALL_ACCESS, &sa,
|
if (!DuplicateTokenEx (token, MAXIMUM_ALLOWED, sec_user (sa_buf, usersid),
|
||||||
SecurityImpersonation, TokenPrimary,
|
SecurityImpersonation, TokenPrimary, &primary_token))
|
||||||
&primary_token))
|
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|
Loading…
Reference in New Issue