I'am working on a windows service which runs under local system account. Now i need to create a worker thread that should use a network resource (not allowed for lacal system).
Now i thought of starting the worker thread not with PB Create Thread ..., but with API
hThread = CreateThread(SECdesc, 0, CODEPTR(SomeThread), _
BYREF Arg, %THREAD_TERMINATE OR %THREAD_QUERY_INFORMATION, _ BYVAL VARPTR(idThread))
I've read something in MSDN, that the passed security descriptor (here: SECdesc) is not filled (pass: BYVAL 0 instead of SECdesc) a default security descriptor based on the primary token will be created.
I know i can receive a primary token for another user with the LogonUser() API.
My question is: How can i get a security descriptor out of that new primary token?
Now i thought of starting the worker thread not with PB Create Thread ..., but with API
hThread = CreateThread(SECdesc, 0, CODEPTR(SomeThread), _
BYREF Arg, %THREAD_TERMINATE OR %THREAD_QUERY_INFORMATION, _ BYVAL VARPTR(idThread))
I've read something in MSDN, that the passed security descriptor (here: SECdesc) is not filled (pass: BYVAL 0 instead of SECdesc) a default security descriptor based on the primary token will be created.
I know i can receive a primary token for another user with the LogonUser() API.
My question is: How can i get a security descriptor out of that new primary token?
Comment