This is available and documented since Windows XP
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/ntdll/ntdll.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 292b0f6a9f1..76412ceb407 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -127,7 +127,7 @@ @ stdcall NtClose(long) @ stub NtCloseObjectAuditAlarm # @ stub NtCompactKeys -# @ stub NtCompareTokens +@ stub NtCompareTokens @ stdcall NtCompleteConnectPort(ptr) # @ stub NtCompressKey @ stdcall NtConnectPort(ptr ptr ptr ptr ptr ptr ptr ptr)
On 05/03/2019 11:30 AM, Vijay Kiran Kamuju wrote:
This is available and documented since Windows XP
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com
dlls/ntdll/ntdll.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 292b0f6a9f1..76412ceb407 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -127,7 +127,7 @@ @ stdcall NtClose(long) @ stub NtCloseObjectAuditAlarm # @ stub NtCompactKeys -# @ stub NtCompareTokens +@ stub NtCompareTokens @ stdcall NtCompleteConnectPort(ptr) # @ stub NtCompressKey @ stdcall NtConnectPort(ptr ptr ptr ptr ptr ptr ptr ptr)
What is this fixing?
This is helpful to the tests for comparing tokens created by NtFilterToken and CreateRestrictedToken. Also for checking DuplicateToken* functions, if it were implemented in wine, but windows exports it. I made a small test for NtFilterToken using NtCompareToken, its crashing in wine.
On Fri, May 3, 2019 at 6:54 PM Zebediah Figura z.figura12@gmail.com wrote:
On 05/03/2019 11:30 AM, Vijay Kiran Kamuju wrote:
This is available and documented since Windows XP
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com
dlls/ntdll/ntdll.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 292b0f6a9f1..76412ceb407 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -127,7 +127,7 @@ @ stdcall NtClose(long) @ stub NtCloseObjectAuditAlarm # @ stub NtCompactKeys -# @ stub NtCompareTokens +@ stub NtCompareTokens @ stdcall NtCompleteConnectPort(ptr) # @ stub NtCompressKey @ stdcall NtConnectPort(ptr ptr ptr ptr ptr ptr ptr ptr)
What is this fixing?
On 05/03/2019 12:20 PM, Vijay Kiran Kamuju wrote:
This is helpful to the tests for comparing tokens created by NtFilterToken and CreateRestrictedToken. Also for checking DuplicateToken* functions, if it were implemented in wine, but windows exports it. I made a small test for NtFilterToken using NtCompareToken, its crashing in wine.
If you're using NtCompareToken() in tests, then leaving it a stub in the specfile is not going to work. You'll end up calling the stub in Wine, and you have no way of avoiding the subsequent crash. You should either (ideally) implement the function completely, or make it into a stub returning STATUS_NOT_IMPLEMENTED.
On 05/03/2019 12:38 PM, Zebediah Figura wrote:
On 05/03/2019 12:20 PM, Vijay Kiran Kamuju wrote:
This is helpful to the tests for comparing tokens created by NtFilterToken and CreateRestrictedToken. Also for checking DuplicateToken* functions, if it were implemented in wine, but windows exports it. I made a small test for NtFilterToken using NtCompareToken, its crashing in wine.
If you're using NtCompareToken() in tests, then leaving it a stub in the specfile is not going to work. You'll end up calling the stub in Wine, and you have no way of avoiding the subsequent crash. You should either (ideally) implement the function completely, or make it into a stub returning STATUS_NOT_IMPLEMENTED.
Not to mention that this function isn't exported from an import library anyway, so I don't see how adding a stub in ntdll helps. You can't link to it.
As per MSDN, this has to used using LoadLibrary and GetProcAddress, which we use in the tests. https://docs.microsoft.com/en-us/windows/desktop/secauthz/ntcomparetokens
On Fri, May 3, 2019 at 7:39 PM Zebediah Figura z.figura12@gmail.com wrote:
On 05/03/2019 12:38 PM, Zebediah Figura wrote:
On 05/03/2019 12:20 PM, Vijay Kiran Kamuju wrote:
This is helpful to the tests for comparing tokens created by NtFilterToken and CreateRestrictedToken. Also for checking DuplicateToken* functions, if it were implemented in wine, but windows exports it. I made a small test for NtFilterToken using NtCompareToken, its crashing in wine.
If you're using NtCompareToken() in tests, then leaving it a stub in the specfile is not going to work. You'll end up calling the stub in Wine, and you have no way of avoiding the subsequent crash. You should either (ideally) implement the function completely, or make it into a stub returning STATUS_NOT_IMPLEMENTED.
Not to mention that this function isn't exported from an import library anyway, so I don't see how adding a stub in ntdll helps. You can't link to it.
Please reject this patch, its a wrong approach. Its due to some typo in my test case.
PS: Lack of sleep is causing issues.
On Fri, May 3, 2019 at 9:24 PM Vijay Kiran Kamuju infyquest@gmail.com wrote:
As per MSDN, this has to used using LoadLibrary and GetProcAddress, which we use in the tests. https://docs.microsoft.com/en-us/windows/desktop/secauthz/ntcomparetokens
On Fri, May 3, 2019 at 7:39 PM Zebediah Figura z.figura12@gmail.com wrote:
On 05/03/2019 12:38 PM, Zebediah Figura wrote:
On 05/03/2019 12:20 PM, Vijay Kiran Kamuju wrote:
This is helpful to the tests for comparing tokens created by NtFilterToken and CreateRestrictedToken. Also for checking DuplicateToken* functions, if it were implemented in wine, but windows exports it. I made a small test for NtFilterToken using NtCompareToken, its crashing in wine.
If you're using NtCompareToken() in tests, then leaving it a stub in the specfile is not going to work. You'll end up calling the stub in Wine, and you have no way of avoiding the subsequent crash. You should either (ideally) implement the function completely, or make it into a stub returning STATUS_NOT_IMPLEMENTED.
Not to mention that this function isn't exported from an import library anyway, so I don't see how adding a stub in ntdll helps. You can't link to it.