Mainly useful for restoring objects marked temporary for test (see MR !5268).
From: Jinoh Kang jinoh.kang.kr@gmail.com
--- dlls/ntdll/tests/om.c | 195 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 62659fc8cb4..74451ae891c 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -3156,6 +3156,200 @@ static void test_null_in_object_name(void) skip("Limited access to \Registry\Machine\Software key, skipping the tests\n"); }
+static void test_object_permanence(void) +{ + static const struct object_permanence_test { + const char *name; + ULONG initial_attr; + ACCESS_MASK access; + BOOLEAN make_temporary; + NTSTATUS make_temp_status; + } tests[] = { + { + .name = "permanent object persists", + .initial_attr = OBJ_PERMANENT, + .access = GENERIC_ALL, + .make_temporary = FALSE, + }, + { + .name = "NtMakeTemporaryObject() succeeds", + .initial_attr = OBJ_PERMANENT, + .access = GENERIC_ALL, + .make_temporary = TRUE, + .make_temp_status = STATUS_SUCCESS, + }, + { + .name = "NtMakeTemporaryObject() fails w/o DELETE access", + .initial_attr = OBJ_PERMANENT, + .access = EVENT_ALL_ACCESS & ~DELETE, + .make_temporary = TRUE, + .make_temp_status = STATUS_ACCESS_DENIED, + }, + + { + .name = "temporary object disappears", + .initial_attr = 0, + .access = GENERIC_ALL, + .make_temporary = FALSE, + }, + { + .name = "NtMakeTemporaryObject() succeeds even if already temporary", + .initial_attr = 0, + .access = GENERIC_ALL, + .make_temporary = TRUE, + .make_temp_status = STATUS_SUCCESS, + }, + { + .name = "NtMakeTemporaryObject() fails w/o DELETE access even if already temporary", + .initial_attr = 0, + .access = EVENT_ALL_ACCESS & ~DELETE, + .make_temporary = TRUE, + .make_temp_status = STATUS_ACCESS_DENIED, + }, + }; + const struct object_permanence_test *test; + HANDLE process_token = NULL, thread_token = NULL; + SECURITY_QUALITY_OF_SERVICE token_qos = { + .Length = sizeof(token_qos), + .ImpersonationLevel = SecurityDelegation, + .ContextTrackingMode = SECURITY_STATIC_TRACKING, + .EffectiveOnly = FALSE, + }; + OBJECT_ATTRIBUTES token_attr = { + .Length = sizeof(token_attr), + .SecurityQualityOfService = &token_qos, + }; + TOKEN_PRIVILEGES new_privs = { + .PrivilegeCount = 1, + .Privileges = { + { + .Luid = { .LowPart = SE_CREATE_PERMANENT_PRIVILEGE }, + .Attributes = SE_PRIVILEGE_ENABLED, + }, + }, + }; + NTSTATUS status; + BOOL creatpermapriv = FALSE; + + status = NtOpenProcessToken( GetCurrentProcess(), TOKEN_DUPLICATE, &process_token ); + ok( status == STATUS_SUCCESS, "NtOpenProcessToken returned %08lx\n", status ); + + status = NtDuplicateToken( process_token, TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_ADJUST_PRIVILEGES, + &token_attr, FALSE, TokenImpersonation, &thread_token ); + ok( status == STATUS_SUCCESS, "NtDuplicateToken returned %08lx\n", status ); + NtClose( process_token ); + + status = NtAdjustPrivilegesToken( thread_token, FALSE, &new_privs, sizeof(new_privs), NULL, NULL ); + todo_wine_if(status != STATUS_NOT_ALL_ASSIGNED) + ok( status == STATUS_SUCCESS || status == STATUS_NOT_ALL_ASSIGNED, "NtAdjustPrivilegesToken returned %08lx\n", status ); + creatpermapriv = (status == STATUS_SUCCESS); + + status = NtSetInformationThread( GetCurrentThread(), ThreadImpersonationToken, &thread_token, sizeof(thread_token) ); + ok( status == STATUS_SUCCESS, "NtSetInformationThread returned %08lx\n", status ); + NtClose( thread_token ); + + for (test = &tests[0]; test != &tests[ARRAY_SIZE(tests)]; test++) + { + HANDLE handle, handle2, handle3; + OBJECT_BASIC_INFORMATION obi; + OBJECT_ATTRIBUTES attr; + UNICODE_STRING name; + BOOL is_permanent; + ULONG len = 0; + + winetest_push_context( "test#%Iu", test - &tests[0] ); + trace( "(%s)\n", test->name ); + + RtlInitUnicodeString( &name, L"\BaseNamedObjects\test_object_permanence" ); + InitializeObjectAttributes( &attr, &name, test->initial_attr, 0, NULL ); + status = NtCreateEvent( &handle, test->access, &attr, NotificationEvent, FALSE ); + if (test->initial_attr & OBJ_PERMANENT) + { + NTSTATUS expected_status = creatpermapriv ? STATUS_SUCCESS : STATUS_PRIVILEGE_NOT_HELD; + todo_wine + ok( status == expected_status, "NtCreateEvent returned %08lx (expected %08lx)\n", status, expected_status ); + is_permanent = TRUE; + } + else + { + ok( status == STATUS_SUCCESS, "NtCreateEvent returned %08lx\n", status ); + is_permanent = FALSE; + } + if (NT_ERROR(status)) + { + winetest_pop_context(); + continue; + } + + status = NtQueryObject( handle, ObjectBasicInformation, &obi, sizeof(obi), &len ); + ok( status == STATUS_SUCCESS, "NtQueryObject returned %08lx\n", status ); + todo_wine_if(test->initial_attr != 0) + ok( obi.Attributes == test->initial_attr, "expected attr %08lx, got %08lx\n", test->initial_attr, obi.Attributes ); + + if (test->make_temporary) + { + if (test->make_temp_status == STATUS_ACCESS_DENIED) + ok( !(obi.GrantedAccess & DELETE), "expected no DELETE access in %08lx\n", obi.GrantedAccess ); + if (test->make_temp_status == STATUS_SUCCESS) + ok( !!(obi.GrantedAccess & DELETE), "expected DELETE access in %08lx\n", obi.GrantedAccess ); + + status = NtMakeTemporaryObject( handle ); + todo_wine_if(test->make_temp_status == STATUS_ACCESS_DENIED) + ok( status == test->make_temp_status, "NtMakeTemporaryObject returned %08lx\n", status ); + if (!NT_ERROR(status)) is_permanent = FALSE; + } + + if (winetest_debug > 1) + trace( "NOTE: object still has unclosed handle (%p) and shouldn't be deleted", handle ); + + winetest_push_context( "first handle (%p) still open", handle ); + status = NtOpenEvent( &handle2, GENERIC_ALL, &attr ); + ok( status == STATUS_SUCCESS, "NtOpenEvent returned %08lx\n", status ); + if (!NT_ERROR(status)) + { + ULONG expect_attr = (obi.Attributes & ~OBJ_PERMANENT) | (is_permanent ? OBJ_PERMANENT : 0); + OBJECT_BASIC_INFORMATION obi2; + + status = NtQueryObject( handle2, ObjectBasicInformation, &obi2, sizeof(obi2), &len ); + ok( status == STATUS_SUCCESS, "NtQueryObject returned %08lx\n", status ); + todo_wine_if(expect_attr != 0) + ok( obi2.Attributes == expect_attr, "expected attr %08lx, got %08lx\n", expect_attr, obi2.Attributes ); + + NtClose( handle2 ); + } + winetest_pop_context(); + + if (winetest_debug > 1) + trace( "NOTE: about to close earlier handle (%p) which should be the last", handle ); + NtClose( handle ); + + winetest_push_context( "first handle closed" ); + status = NtOpenEvent( &handle3, GENERIC_ALL, &attr ); + ok( status == (is_permanent ? STATUS_SUCCESS : STATUS_OBJECT_NAME_NOT_FOUND), "NtOpenEvent returned %08lx\n", status ); + if (!NT_ERROR(status)) + { + ULONG expect_attr = (obi.Attributes & ~OBJ_PERMANENT) | (is_permanent ? OBJ_PERMANENT : 0); + OBJECT_BASIC_INFORMATION obi3; + + status = NtQueryObject( handle3, ObjectBasicInformation, &obi3, sizeof(obi3), &len ); + ok( status == STATUS_SUCCESS, "NtQueryObject returned %08lx\n", status ); + todo_wine_if(expect_attr != 0) + ok( obi3.Attributes == expect_attr, "expected attr %08lx, got %08lx\n", expect_attr, obi3.Attributes ); + + /* ensure object is deleted */ + NtMakeTemporaryObject( handle3 ); + NtClose( handle3 ); + } + winetest_pop_context(); + + winetest_pop_context(); + } + + thread_token = NULL; + status = NtSetInformationThread( GetCurrentThread(), ThreadImpersonationToken, &thread_token, sizeof(thread_token) ); + ok( status == STATUS_SUCCESS, "NtSetInformationThread returned %08lx\n", status ); +} + START_TEST(om) { HMODULE hntdll = GetModuleHandleA("ntdll.dll"); @@ -3219,4 +3413,5 @@ START_TEST(om) test_globalroot(); test_object_identity(); test_query_directory(); + test_object_permanence(); }
From: Jinoh Kang jinoh.kang.kr@gmail.com
Required for implementing NtMakePermanentObject(). --- dlls/ntdll/unix/sync.c | 3 ++- server/handle.c | 9 +++++++-- server/protocol.def | 5 +++-- 3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index cde6a0f8483..68a861f047a 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -1281,9 +1281,10 @@ NTSTATUS WINAPI NtMakeTemporaryObject( HANDLE handle )
TRACE("%p\n", handle);
- SERVER_START_REQ( make_temporary ) + SERVER_START_REQ( set_object_permanence ) { req->handle = wine_server_obj_handle( handle ); + req->permanent = 0; ret = wine_server_call( req ); } SERVER_END_REQ; diff --git a/server/handle.c b/server/handle.c index 71cdd2e328c..02a5a22edd1 100644 --- a/server/handle.c +++ b/server/handle.c @@ -885,13 +885,18 @@ DECL_HANDLER(get_system_handles) } }
-DECL_HANDLER(make_temporary) +DECL_HANDLER(set_object_permanence) { struct object *obj;
if (!(obj = get_handle_obj( current->process, req->handle, 0, NULL ))) return;
- if (obj->is_permanent) + if (req->permanent && !obj->is_permanent) + { + grab_object( obj ); + make_object_permanent( obj ); + } + else if (!req->permanent && obj->is_permanent) { make_object_temporary( obj ); release_object( obj ); diff --git a/server/protocol.def b/server/protocol.def index 13aea96e796..814ad741f9a 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1175,9 +1175,10 @@ typedef struct @END
-/* Make an object temporary */ -@REQ(make_temporary) +/* Make an object permanent or temporary */ +@REQ(set_object_permanence) obj_handle_t handle; /* handle to the object */ + int permanent; /* 1 to make permanent, 0 to make temporary */ @END
From: Jinoh Kang jinoh.kang.kr@gmail.com
--- dlls/ntdll/ntdll.spec | 4 +- dlls/ntdll/ntsyscalls.h | 592 ++++++++++++++-------------- dlls/ntdll/signal_arm64ec.c | 5 + dlls/ntdll/tests/om.c | 58 +++ dlls/ntdll/unix/sync.c | 20 + dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- dlls/wow64/sync.c | 11 + include/winternl.h | 1 + 8 files changed, 395 insertions(+), 298 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 2c5a69a410c..1580df9f188 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -253,7 +253,7 @@ # @ stub NtLockProductActivationKeys # @ stub NtLockRegistryKey @ stdcall -syscall NtLockVirtualMemory(long ptr ptr long) -# @ stub NtMakePermanentObject +@ stdcall -syscall NtMakePermanentObject(long) @ stdcall -syscall NtMakeTemporaryObject(long) # @ stub NtMapUserPhysicalPages # @ stub NtMapUserPhysicalPagesScatter @@ -1301,7 +1301,7 @@ # @ stub ZwLockProductActivationKeys # @ stub ZwLockRegistryKey @ stdcall -private -syscall ZwLockVirtualMemory(long ptr ptr long) NtLockVirtualMemory -# @ stub ZwMakePermanentObject +@ stdcall -private -syscall ZwMakePermanentObject(long) NtMakePermanentObject @ stdcall -private -syscall ZwMakeTemporaryObject(long) NtMakeTemporaryObject # @ stub ZwMapUserPhysicalPages # @ stub ZwMapUserPhysicalPagesScatter diff --git a/dlls/ntdll/ntsyscalls.h b/dlls/ntdll/ntsyscalls.h index 10813ee977d..53045c5f6be 100644 --- a/dlls/ntdll/ntsyscalls.h +++ b/dlls/ntdll/ntsyscalls.h @@ -91,156 +91,157 @@ SYSCALL_ENTRY( 0x0057, NtLoadKeyEx, 32 ) \ SYSCALL_ENTRY( 0x0058, NtLockFile, 40 ) \ SYSCALL_ENTRY( 0x0059, NtLockVirtualMemory, 16 ) \ - SYSCALL_ENTRY( 0x005a, NtMakeTemporaryObject, 4 ) \ - SYSCALL_ENTRY( 0x005b, NtMapViewOfSection, 40 ) \ - SYSCALL_ENTRY( 0x005c, NtMapViewOfSectionEx, 36 ) \ - SYSCALL_ENTRY( 0x005d, NtNotifyChangeDirectoryFile, 36 ) \ - SYSCALL_ENTRY( 0x005e, NtNotifyChangeKey, 40 ) \ - SYSCALL_ENTRY( 0x005f, NtNotifyChangeMultipleKeys, 48 ) \ - SYSCALL_ENTRY( 0x0060, NtOpenDirectoryObject, 12 ) \ - SYSCALL_ENTRY( 0x0061, NtOpenEvent, 12 ) \ - SYSCALL_ENTRY( 0x0062, NtOpenFile, 24 ) \ - SYSCALL_ENTRY( 0x0063, NtOpenIoCompletion, 12 ) \ - SYSCALL_ENTRY( 0x0064, NtOpenJobObject, 12 ) \ - SYSCALL_ENTRY( 0x0065, NtOpenKey, 12 ) \ - SYSCALL_ENTRY( 0x0066, NtOpenKeyEx, 16 ) \ - SYSCALL_ENTRY( 0x0067, NtOpenKeyTransacted, 16 ) \ - SYSCALL_ENTRY( 0x0068, NtOpenKeyTransactedEx, 20 ) \ - SYSCALL_ENTRY( 0x0069, NtOpenKeyedEvent, 12 ) \ - SYSCALL_ENTRY( 0x006a, NtOpenMutant, 12 ) \ - SYSCALL_ENTRY( 0x006b, NtOpenProcess, 16 ) \ - SYSCALL_ENTRY( 0x006c, NtOpenProcessToken, 12 ) \ - SYSCALL_ENTRY( 0x006d, NtOpenProcessTokenEx, 16 ) \ - SYSCALL_ENTRY( 0x006e, NtOpenSection, 12 ) \ - SYSCALL_ENTRY( 0x006f, NtOpenSemaphore, 12 ) \ - SYSCALL_ENTRY( 0x0070, NtOpenSymbolicLinkObject, 12 ) \ - SYSCALL_ENTRY( 0x0071, NtOpenThread, 16 ) \ - SYSCALL_ENTRY( 0x0072, NtOpenThreadToken, 16 ) \ - SYSCALL_ENTRY( 0x0073, NtOpenThreadTokenEx, 20 ) \ - SYSCALL_ENTRY( 0x0074, NtOpenTimer, 12 ) \ - SYSCALL_ENTRY( 0x0075, NtPowerInformation, 20 ) \ - SYSCALL_ENTRY( 0x0076, NtPrivilegeCheck, 12 ) \ - SYSCALL_ENTRY( 0x0077, NtProtectVirtualMemory, 20 ) \ - SYSCALL_ENTRY( 0x0078, NtPulseEvent, 8 ) \ - SYSCALL_ENTRY( 0x0079, NtQueryAttributesFile, 8 ) \ - SYSCALL_ENTRY( 0x007a, NtQueryDefaultLocale, 8 ) \ - SYSCALL_ENTRY( 0x007b, NtQueryDefaultUILanguage, 4 ) \ - SYSCALL_ENTRY( 0x007c, NtQueryDirectoryFile, 44 ) \ - SYSCALL_ENTRY( 0x007d, NtQueryDirectoryObject, 28 ) \ - SYSCALL_ENTRY( 0x007e, NtQueryEaFile, 36 ) \ - SYSCALL_ENTRY( 0x007f, NtQueryEvent, 20 ) \ - SYSCALL_ENTRY( 0x0080, NtQueryFullAttributesFile, 8 ) \ - SYSCALL_ENTRY( 0x0081, NtQueryInformationAtom, 20 ) \ - SYSCALL_ENTRY( 0x0082, NtQueryInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x0083, NtQueryInformationJobObject, 20 ) \ - SYSCALL_ENTRY( 0x0084, NtQueryInformationProcess, 20 ) \ - SYSCALL_ENTRY( 0x0085, NtQueryInformationThread, 20 ) \ - SYSCALL_ENTRY( 0x0086, NtQueryInformationToken, 20 ) \ - SYSCALL_ENTRY( 0x0087, NtQueryInstallUILanguage, 4 ) \ - SYSCALL_ENTRY( 0x0088, NtQueryIoCompletion, 20 ) \ - SYSCALL_ENTRY( 0x0089, NtQueryKey, 20 ) \ - SYSCALL_ENTRY( 0x008a, NtQueryLicenseValue, 20 ) \ - SYSCALL_ENTRY( 0x008b, NtQueryMultipleValueKey, 24 ) \ - SYSCALL_ENTRY( 0x008c, NtQueryMutant, 20 ) \ - SYSCALL_ENTRY( 0x008d, NtQueryObject, 20 ) \ - SYSCALL_ENTRY( 0x008e, NtQueryPerformanceCounter, 8 ) \ - SYSCALL_ENTRY( 0x008f, NtQuerySection, 20 ) \ - SYSCALL_ENTRY( 0x0090, NtQuerySecurityObject, 20 ) \ - SYSCALL_ENTRY( 0x0091, NtQuerySemaphore, 20 ) \ - SYSCALL_ENTRY( 0x0092, NtQuerySymbolicLinkObject, 12 ) \ - SYSCALL_ENTRY( 0x0093, NtQuerySystemEnvironmentValue, 16 ) \ - SYSCALL_ENTRY( 0x0094, NtQuerySystemEnvironmentValueEx, 20 ) \ - SYSCALL_ENTRY( 0x0095, NtQuerySystemInformation, 16 ) \ - SYSCALL_ENTRY( 0x0096, NtQuerySystemInformationEx, 24 ) \ - SYSCALL_ENTRY( 0x0097, NtQuerySystemTime, 4 ) \ - SYSCALL_ENTRY( 0x0098, NtQueryTimer, 20 ) \ - SYSCALL_ENTRY( 0x0099, NtQueryTimerResolution, 12 ) \ - SYSCALL_ENTRY( 0x009a, NtQueryValueKey, 24 ) \ - SYSCALL_ENTRY( 0x009b, NtQueryVirtualMemory, 24 ) \ - SYSCALL_ENTRY( 0x009c, NtQueryVolumeInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x009d, NtQueueApcThread, 20 ) \ - SYSCALL_ENTRY( 0x009e, NtRaiseException, 12 ) \ - SYSCALL_ENTRY( 0x009f, NtRaiseHardError, 24 ) \ - SYSCALL_ENTRY( 0x00a0, NtReadFile, 36 ) \ - SYSCALL_ENTRY( 0x00a1, NtReadFileScatter, 36 ) \ - SYSCALL_ENTRY( 0x00a2, NtReadVirtualMemory, 20 ) \ - SYSCALL_ENTRY( 0x00a3, NtRegisterThreadTerminatePort, 4 ) \ - SYSCALL_ENTRY( 0x00a4, NtReleaseKeyedEvent, 16 ) \ - SYSCALL_ENTRY( 0x00a5, NtReleaseMutant, 8 ) \ - SYSCALL_ENTRY( 0x00a6, NtReleaseSemaphore, 12 ) \ - SYSCALL_ENTRY( 0x00a7, NtRemoveIoCompletion, 20 ) \ - SYSCALL_ENTRY( 0x00a8, NtRemoveIoCompletionEx, 24 ) \ - SYSCALL_ENTRY( 0x00a9, NtRemoveProcessDebug, 8 ) \ - SYSCALL_ENTRY( 0x00aa, NtRenameKey, 8 ) \ - SYSCALL_ENTRY( 0x00ab, NtReplaceKey, 12 ) \ - SYSCALL_ENTRY( 0x00ac, NtReplyWaitReceivePort, 16 ) \ - SYSCALL_ENTRY( 0x00ad, NtRequestWaitReplyPort, 12 ) \ - SYSCALL_ENTRY( 0x00ae, NtResetEvent, 8 ) \ - SYSCALL_ENTRY( 0x00af, NtResetWriteWatch, 12 ) \ - SYSCALL_ENTRY( 0x00b0, NtRestoreKey, 12 ) \ - SYSCALL_ENTRY( 0x00b1, NtResumeProcess, 4 ) \ - SYSCALL_ENTRY( 0x00b2, NtResumeThread, 8 ) \ - SYSCALL_ENTRY( 0x00b3, NtRollbackTransaction, 8 ) \ - SYSCALL_ENTRY( 0x00b4, NtSaveKey, 8 ) \ - SYSCALL_ENTRY( 0x00b5, NtSecureConnectPort, 36 ) \ - SYSCALL_ENTRY( 0x00b6, NtSetContextThread, 8 ) \ - SYSCALL_ENTRY( 0x00b7, NtSetDebugFilterState, 12 ) \ - SYSCALL_ENTRY( 0x00b8, NtSetDefaultLocale, 8 ) \ - SYSCALL_ENTRY( 0x00b9, NtSetDefaultUILanguage, 4 ) \ - SYSCALL_ENTRY( 0x00ba, NtSetEaFile, 16 ) \ - SYSCALL_ENTRY( 0x00bb, NtSetEvent, 8 ) \ - SYSCALL_ENTRY( 0x00bc, NtSetInformationDebugObject, 20 ) \ - SYSCALL_ENTRY( 0x00bd, NtSetInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x00be, NtSetInformationJobObject, 16 ) \ - SYSCALL_ENTRY( 0x00bf, NtSetInformationKey, 16 ) \ - SYSCALL_ENTRY( 0x00c0, NtSetInformationObject, 16 ) \ - SYSCALL_ENTRY( 0x00c1, NtSetInformationProcess, 16 ) \ - SYSCALL_ENTRY( 0x00c2, NtSetInformationThread, 16 ) \ - SYSCALL_ENTRY( 0x00c3, NtSetInformationToken, 16 ) \ - SYSCALL_ENTRY( 0x00c4, NtSetInformationVirtualMemory, 24 ) \ - SYSCALL_ENTRY( 0x00c5, NtSetIntervalProfile, 8 ) \ - SYSCALL_ENTRY( 0x00c6, NtSetIoCompletion, 20 ) \ - SYSCALL_ENTRY( 0x00c7, NtSetLdtEntries, 24 ) \ - SYSCALL_ENTRY( 0x00c8, NtSetSecurityObject, 12 ) \ - SYSCALL_ENTRY( 0x00c9, NtSetSystemInformation, 12 ) \ - SYSCALL_ENTRY( 0x00ca, NtSetSystemTime, 8 ) \ - SYSCALL_ENTRY( 0x00cb, NtSetThreadExecutionState, 8 ) \ - SYSCALL_ENTRY( 0x00cc, NtSetTimer, 28 ) \ - SYSCALL_ENTRY( 0x00cd, NtSetTimerResolution, 12 ) \ - SYSCALL_ENTRY( 0x00ce, NtSetValueKey, 24 ) \ - SYSCALL_ENTRY( 0x00cf, NtSetVolumeInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x00d0, NtShutdownSystem, 4 ) \ - SYSCALL_ENTRY( 0x00d1, NtSignalAndWaitForSingleObject, 16 ) \ - SYSCALL_ENTRY( 0x00d2, NtSuspendProcess, 4 ) \ - SYSCALL_ENTRY( 0x00d3, NtSuspendThread, 8 ) \ - SYSCALL_ENTRY( 0x00d4, NtSystemDebugControl, 24 ) \ - SYSCALL_ENTRY( 0x00d5, NtTerminateJobObject, 8 ) \ - SYSCALL_ENTRY( 0x00d6, NtTerminateProcess, 8 ) \ - SYSCALL_ENTRY( 0x00d7, NtTerminateThread, 8 ) \ - SYSCALL_ENTRY( 0x00d8, NtTestAlert, 0 ) \ - SYSCALL_ENTRY( 0x00d9, NtTraceControl, 24 ) \ - SYSCALL_ENTRY( 0x00da, NtUnloadDriver, 4 ) \ - SYSCALL_ENTRY( 0x00db, NtUnloadKey, 4 ) \ - SYSCALL_ENTRY( 0x00dc, NtUnlockFile, 20 ) \ - SYSCALL_ENTRY( 0x00dd, NtUnlockVirtualMemory, 16 ) \ - SYSCALL_ENTRY( 0x00de, NtUnmapViewOfSection, 8 ) \ - SYSCALL_ENTRY( 0x00df, NtUnmapViewOfSectionEx, 12 ) \ - SYSCALL_ENTRY( 0x00e0, NtWaitForAlertByThreadId, 8 ) \ - SYSCALL_ENTRY( 0x00e1, NtWaitForDebugEvent, 16 ) \ - SYSCALL_ENTRY( 0x00e2, NtWaitForKeyedEvent, 16 ) \ - SYSCALL_ENTRY( 0x00e3, NtWaitForMultipleObjects, 20 ) \ - SYSCALL_ENTRY( 0x00e4, NtWaitForSingleObject, 12 ) \ - SYSCALL_ENTRY( 0x00e5, NtWow64AllocateVirtualMemory64, 28 ) \ - SYSCALL_ENTRY( 0x00e6, NtWow64GetNativeSystemInformation, 16 ) \ - SYSCALL_ENTRY( 0x00e7, NtWow64IsProcessorFeaturePresent, 4 ) \ - SYSCALL_ENTRY( 0x00e8, NtWow64ReadVirtualMemory64, 28 ) \ - SYSCALL_ENTRY( 0x00e9, NtWow64WriteVirtualMemory64, 28 ) \ - SYSCALL_ENTRY( 0x00ea, NtWriteFile, 36 ) \ - SYSCALL_ENTRY( 0x00eb, NtWriteFileGather, 36 ) \ - SYSCALL_ENTRY( 0x00ec, NtWriteVirtualMemory, 20 ) \ - SYSCALL_ENTRY( 0x00ed, NtYieldExecution, 0 ) \ - SYSCALL_ENTRY( 0x00ee, wine_nt_to_unix_file_name, 16 ) \ - SYSCALL_ENTRY( 0x00ef, wine_unix_to_nt_file_name, 12 ) + SYSCALL_ENTRY( 0x005a, NtMakePermanentObject, 4 ) \ + SYSCALL_ENTRY( 0x005b, NtMakeTemporaryObject, 4 ) \ + SYSCALL_ENTRY( 0x005c, NtMapViewOfSection, 40 ) \ + SYSCALL_ENTRY( 0x005d, NtMapViewOfSectionEx, 36 ) \ + SYSCALL_ENTRY( 0x005e, NtNotifyChangeDirectoryFile, 36 ) \ + SYSCALL_ENTRY( 0x005f, NtNotifyChangeKey, 40 ) \ + SYSCALL_ENTRY( 0x0060, NtNotifyChangeMultipleKeys, 48 ) \ + SYSCALL_ENTRY( 0x0061, NtOpenDirectoryObject, 12 ) \ + SYSCALL_ENTRY( 0x0062, NtOpenEvent, 12 ) \ + SYSCALL_ENTRY( 0x0063, NtOpenFile, 24 ) \ + SYSCALL_ENTRY( 0x0064, NtOpenIoCompletion, 12 ) \ + SYSCALL_ENTRY( 0x0065, NtOpenJobObject, 12 ) \ + SYSCALL_ENTRY( 0x0066, NtOpenKey, 12 ) \ + SYSCALL_ENTRY( 0x0067, NtOpenKeyEx, 16 ) \ + SYSCALL_ENTRY( 0x0068, NtOpenKeyTransacted, 16 ) \ + SYSCALL_ENTRY( 0x0069, NtOpenKeyTransactedEx, 20 ) \ + SYSCALL_ENTRY( 0x006a, NtOpenKeyedEvent, 12 ) \ + SYSCALL_ENTRY( 0x006b, NtOpenMutant, 12 ) \ + SYSCALL_ENTRY( 0x006c, NtOpenProcess, 16 ) \ + SYSCALL_ENTRY( 0x006d, NtOpenProcessToken, 12 ) \ + SYSCALL_ENTRY( 0x006e, NtOpenProcessTokenEx, 16 ) \ + SYSCALL_ENTRY( 0x006f, NtOpenSection, 12 ) \ + SYSCALL_ENTRY( 0x0070, NtOpenSemaphore, 12 ) \ + SYSCALL_ENTRY( 0x0071, NtOpenSymbolicLinkObject, 12 ) \ + SYSCALL_ENTRY( 0x0072, NtOpenThread, 16 ) \ + SYSCALL_ENTRY( 0x0073, NtOpenThreadToken, 16 ) \ + SYSCALL_ENTRY( 0x0074, NtOpenThreadTokenEx, 20 ) \ + SYSCALL_ENTRY( 0x0075, NtOpenTimer, 12 ) \ + SYSCALL_ENTRY( 0x0076, NtPowerInformation, 20 ) \ + SYSCALL_ENTRY( 0x0077, NtPrivilegeCheck, 12 ) \ + SYSCALL_ENTRY( 0x0078, NtProtectVirtualMemory, 20 ) \ + SYSCALL_ENTRY( 0x0079, NtPulseEvent, 8 ) \ + SYSCALL_ENTRY( 0x007a, NtQueryAttributesFile, 8 ) \ + SYSCALL_ENTRY( 0x007b, NtQueryDefaultLocale, 8 ) \ + SYSCALL_ENTRY( 0x007c, NtQueryDefaultUILanguage, 4 ) \ + SYSCALL_ENTRY( 0x007d, NtQueryDirectoryFile, 44 ) \ + SYSCALL_ENTRY( 0x007e, NtQueryDirectoryObject, 28 ) \ + SYSCALL_ENTRY( 0x007f, NtQueryEaFile, 36 ) \ + SYSCALL_ENTRY( 0x0080, NtQueryEvent, 20 ) \ + SYSCALL_ENTRY( 0x0081, NtQueryFullAttributesFile, 8 ) \ + SYSCALL_ENTRY( 0x0082, NtQueryInformationAtom, 20 ) \ + SYSCALL_ENTRY( 0x0083, NtQueryInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x0084, NtQueryInformationJobObject, 20 ) \ + SYSCALL_ENTRY( 0x0085, NtQueryInformationProcess, 20 ) \ + SYSCALL_ENTRY( 0x0086, NtQueryInformationThread, 20 ) \ + SYSCALL_ENTRY( 0x0087, NtQueryInformationToken, 20 ) \ + SYSCALL_ENTRY( 0x0088, NtQueryInstallUILanguage, 4 ) \ + SYSCALL_ENTRY( 0x0089, NtQueryIoCompletion, 20 ) \ + SYSCALL_ENTRY( 0x008a, NtQueryKey, 20 ) \ + SYSCALL_ENTRY( 0x008b, NtQueryLicenseValue, 20 ) \ + SYSCALL_ENTRY( 0x008c, NtQueryMultipleValueKey, 24 ) \ + SYSCALL_ENTRY( 0x008d, NtQueryMutant, 20 ) \ + SYSCALL_ENTRY( 0x008e, NtQueryObject, 20 ) \ + SYSCALL_ENTRY( 0x008f, NtQueryPerformanceCounter, 8 ) \ + SYSCALL_ENTRY( 0x0090, NtQuerySection, 20 ) \ + SYSCALL_ENTRY( 0x0091, NtQuerySecurityObject, 20 ) \ + SYSCALL_ENTRY( 0x0092, NtQuerySemaphore, 20 ) \ + SYSCALL_ENTRY( 0x0093, NtQuerySymbolicLinkObject, 12 ) \ + SYSCALL_ENTRY( 0x0094, NtQuerySystemEnvironmentValue, 16 ) \ + SYSCALL_ENTRY( 0x0095, NtQuerySystemEnvironmentValueEx, 20 ) \ + SYSCALL_ENTRY( 0x0096, NtQuerySystemInformation, 16 ) \ + SYSCALL_ENTRY( 0x0097, NtQuerySystemInformationEx, 24 ) \ + SYSCALL_ENTRY( 0x0098, NtQuerySystemTime, 4 ) \ + SYSCALL_ENTRY( 0x0099, NtQueryTimer, 20 ) \ + SYSCALL_ENTRY( 0x009a, NtQueryTimerResolution, 12 ) \ + SYSCALL_ENTRY( 0x009b, NtQueryValueKey, 24 ) \ + SYSCALL_ENTRY( 0x009c, NtQueryVirtualMemory, 24 ) \ + SYSCALL_ENTRY( 0x009d, NtQueryVolumeInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x009e, NtQueueApcThread, 20 ) \ + SYSCALL_ENTRY( 0x009f, NtRaiseException, 12 ) \ + SYSCALL_ENTRY( 0x00a0, NtRaiseHardError, 24 ) \ + SYSCALL_ENTRY( 0x00a1, NtReadFile, 36 ) \ + SYSCALL_ENTRY( 0x00a2, NtReadFileScatter, 36 ) \ + SYSCALL_ENTRY( 0x00a3, NtReadVirtualMemory, 20 ) \ + SYSCALL_ENTRY( 0x00a4, NtRegisterThreadTerminatePort, 4 ) \ + SYSCALL_ENTRY( 0x00a5, NtReleaseKeyedEvent, 16 ) \ + SYSCALL_ENTRY( 0x00a6, NtReleaseMutant, 8 ) \ + SYSCALL_ENTRY( 0x00a7, NtReleaseSemaphore, 12 ) \ + SYSCALL_ENTRY( 0x00a8, NtRemoveIoCompletion, 20 ) \ + SYSCALL_ENTRY( 0x00a9, NtRemoveIoCompletionEx, 24 ) \ + SYSCALL_ENTRY( 0x00aa, NtRemoveProcessDebug, 8 ) \ + SYSCALL_ENTRY( 0x00ab, NtRenameKey, 8 ) \ + SYSCALL_ENTRY( 0x00ac, NtReplaceKey, 12 ) \ + SYSCALL_ENTRY( 0x00ad, NtReplyWaitReceivePort, 16 ) \ + SYSCALL_ENTRY( 0x00ae, NtRequestWaitReplyPort, 12 ) \ + SYSCALL_ENTRY( 0x00af, NtResetEvent, 8 ) \ + SYSCALL_ENTRY( 0x00b0, NtResetWriteWatch, 12 ) \ + SYSCALL_ENTRY( 0x00b1, NtRestoreKey, 12 ) \ + SYSCALL_ENTRY( 0x00b2, NtResumeProcess, 4 ) \ + SYSCALL_ENTRY( 0x00b3, NtResumeThread, 8 ) \ + SYSCALL_ENTRY( 0x00b4, NtRollbackTransaction, 8 ) \ + SYSCALL_ENTRY( 0x00b5, NtSaveKey, 8 ) \ + SYSCALL_ENTRY( 0x00b6, NtSecureConnectPort, 36 ) \ + SYSCALL_ENTRY( 0x00b7, NtSetContextThread, 8 ) \ + SYSCALL_ENTRY( 0x00b8, NtSetDebugFilterState, 12 ) \ + SYSCALL_ENTRY( 0x00b9, NtSetDefaultLocale, 8 ) \ + SYSCALL_ENTRY( 0x00ba, NtSetDefaultUILanguage, 4 ) \ + SYSCALL_ENTRY( 0x00bb, NtSetEaFile, 16 ) \ + SYSCALL_ENTRY( 0x00bc, NtSetEvent, 8 ) \ + SYSCALL_ENTRY( 0x00bd, NtSetInformationDebugObject, 20 ) \ + SYSCALL_ENTRY( 0x00be, NtSetInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x00bf, NtSetInformationJobObject, 16 ) \ + SYSCALL_ENTRY( 0x00c0, NtSetInformationKey, 16 ) \ + SYSCALL_ENTRY( 0x00c1, NtSetInformationObject, 16 ) \ + SYSCALL_ENTRY( 0x00c2, NtSetInformationProcess, 16 ) \ + SYSCALL_ENTRY( 0x00c3, NtSetInformationThread, 16 ) \ + SYSCALL_ENTRY( 0x00c4, NtSetInformationToken, 16 ) \ + SYSCALL_ENTRY( 0x00c5, NtSetInformationVirtualMemory, 24 ) \ + SYSCALL_ENTRY( 0x00c6, NtSetIntervalProfile, 8 ) \ + SYSCALL_ENTRY( 0x00c7, NtSetIoCompletion, 20 ) \ + SYSCALL_ENTRY( 0x00c8, NtSetLdtEntries, 24 ) \ + SYSCALL_ENTRY( 0x00c9, NtSetSecurityObject, 12 ) \ + SYSCALL_ENTRY( 0x00ca, NtSetSystemInformation, 12 ) \ + SYSCALL_ENTRY( 0x00cb, NtSetSystemTime, 8 ) \ + SYSCALL_ENTRY( 0x00cc, NtSetThreadExecutionState, 8 ) \ + SYSCALL_ENTRY( 0x00cd, NtSetTimer, 28 ) \ + SYSCALL_ENTRY( 0x00ce, NtSetTimerResolution, 12 ) \ + SYSCALL_ENTRY( 0x00cf, NtSetValueKey, 24 ) \ + SYSCALL_ENTRY( 0x00d0, NtSetVolumeInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x00d1, NtShutdownSystem, 4 ) \ + SYSCALL_ENTRY( 0x00d2, NtSignalAndWaitForSingleObject, 16 ) \ + SYSCALL_ENTRY( 0x00d3, NtSuspendProcess, 4 ) \ + SYSCALL_ENTRY( 0x00d4, NtSuspendThread, 8 ) \ + SYSCALL_ENTRY( 0x00d5, NtSystemDebugControl, 24 ) \ + SYSCALL_ENTRY( 0x00d6, NtTerminateJobObject, 8 ) \ + SYSCALL_ENTRY( 0x00d7, NtTerminateProcess, 8 ) \ + SYSCALL_ENTRY( 0x00d8, NtTerminateThread, 8 ) \ + SYSCALL_ENTRY( 0x00d9, NtTestAlert, 0 ) \ + SYSCALL_ENTRY( 0x00da, NtTraceControl, 24 ) \ + SYSCALL_ENTRY( 0x00db, NtUnloadDriver, 4 ) \ + SYSCALL_ENTRY( 0x00dc, NtUnloadKey, 4 ) \ + SYSCALL_ENTRY( 0x00dd, NtUnlockFile, 20 ) \ + SYSCALL_ENTRY( 0x00de, NtUnlockVirtualMemory, 16 ) \ + SYSCALL_ENTRY( 0x00df, NtUnmapViewOfSection, 8 ) \ + SYSCALL_ENTRY( 0x00e0, NtUnmapViewOfSectionEx, 12 ) \ + SYSCALL_ENTRY( 0x00e1, NtWaitForAlertByThreadId, 8 ) \ + SYSCALL_ENTRY( 0x00e2, NtWaitForDebugEvent, 16 ) \ + SYSCALL_ENTRY( 0x00e3, NtWaitForKeyedEvent, 16 ) \ + SYSCALL_ENTRY( 0x00e4, NtWaitForMultipleObjects, 20 ) \ + SYSCALL_ENTRY( 0x00e5, NtWaitForSingleObject, 12 ) \ + SYSCALL_ENTRY( 0x00e6, NtWow64AllocateVirtualMemory64, 28 ) \ + SYSCALL_ENTRY( 0x00e7, NtWow64GetNativeSystemInformation, 16 ) \ + SYSCALL_ENTRY( 0x00e8, NtWow64IsProcessorFeaturePresent, 4 ) \ + SYSCALL_ENTRY( 0x00e9, NtWow64ReadVirtualMemory64, 28 ) \ + SYSCALL_ENTRY( 0x00ea, NtWow64WriteVirtualMemory64, 28 ) \ + SYSCALL_ENTRY( 0x00eb, NtWriteFile, 36 ) \ + SYSCALL_ENTRY( 0x00ec, NtWriteFileGather, 36 ) \ + SYSCALL_ENTRY( 0x00ed, NtWriteVirtualMemory, 20 ) \ + SYSCALL_ENTRY( 0x00ee, NtYieldExecution, 0 ) \ + SYSCALL_ENTRY( 0x00ef, wine_nt_to_unix_file_name, 16 ) \ + SYSCALL_ENTRY( 0x00f0, wine_unix_to_nt_file_name, 12 )
#define ALL_SYSCALLS64 \ SYSCALL_ENTRY( 0x0000, NtAcceptConnectPort, 48 ) \ @@ -333,148 +334,149 @@ SYSCALL_ENTRY( 0x0057, NtLoadKeyEx, 64 ) \ SYSCALL_ENTRY( 0x0058, NtLockFile, 80 ) \ SYSCALL_ENTRY( 0x0059, NtLockVirtualMemory, 32 ) \ - SYSCALL_ENTRY( 0x005a, NtMakeTemporaryObject, 8 ) \ - SYSCALL_ENTRY( 0x005b, NtMapViewOfSection, 80 ) \ - SYSCALL_ENTRY( 0x005c, NtMapViewOfSectionEx, 72 ) \ - SYSCALL_ENTRY( 0x005d, NtNotifyChangeDirectoryFile, 72 ) \ - SYSCALL_ENTRY( 0x005e, NtNotifyChangeKey, 80 ) \ - SYSCALL_ENTRY( 0x005f, NtNotifyChangeMultipleKeys, 96 ) \ - SYSCALL_ENTRY( 0x0060, NtOpenDirectoryObject, 24 ) \ - SYSCALL_ENTRY( 0x0061, NtOpenEvent, 24 ) \ - SYSCALL_ENTRY( 0x0062, NtOpenFile, 48 ) \ - SYSCALL_ENTRY( 0x0063, NtOpenIoCompletion, 24 ) \ - SYSCALL_ENTRY( 0x0064, NtOpenJobObject, 24 ) \ - SYSCALL_ENTRY( 0x0065, NtOpenKey, 24 ) \ - SYSCALL_ENTRY( 0x0066, NtOpenKeyEx, 32 ) \ - SYSCALL_ENTRY( 0x0067, NtOpenKeyTransacted, 32 ) \ - SYSCALL_ENTRY( 0x0068, NtOpenKeyTransactedEx, 40 ) \ - SYSCALL_ENTRY( 0x0069, NtOpenKeyedEvent, 24 ) \ - SYSCALL_ENTRY( 0x006a, NtOpenMutant, 24 ) \ - SYSCALL_ENTRY( 0x006b, NtOpenProcess, 32 ) \ - SYSCALL_ENTRY( 0x006c, NtOpenProcessToken, 24 ) \ - SYSCALL_ENTRY( 0x006d, NtOpenProcessTokenEx, 32 ) \ - SYSCALL_ENTRY( 0x006e, NtOpenSection, 24 ) \ - SYSCALL_ENTRY( 0x006f, NtOpenSemaphore, 24 ) \ - SYSCALL_ENTRY( 0x0070, NtOpenSymbolicLinkObject, 24 ) \ - SYSCALL_ENTRY( 0x0071, NtOpenThread, 32 ) \ - SYSCALL_ENTRY( 0x0072, NtOpenThreadToken, 32 ) \ - SYSCALL_ENTRY( 0x0073, NtOpenThreadTokenEx, 40 ) \ - SYSCALL_ENTRY( 0x0074, NtOpenTimer, 24 ) \ - SYSCALL_ENTRY( 0x0075, NtPowerInformation, 40 ) \ - SYSCALL_ENTRY( 0x0076, NtPrivilegeCheck, 24 ) \ - SYSCALL_ENTRY( 0x0077, NtProtectVirtualMemory, 40 ) \ - SYSCALL_ENTRY( 0x0078, NtPulseEvent, 16 ) \ - SYSCALL_ENTRY( 0x0079, NtQueryAttributesFile, 16 ) \ - SYSCALL_ENTRY( 0x007a, NtQueryDefaultLocale, 16 ) \ - SYSCALL_ENTRY( 0x007b, NtQueryDefaultUILanguage, 8 ) \ - SYSCALL_ENTRY( 0x007c, NtQueryDirectoryFile, 88 ) \ - SYSCALL_ENTRY( 0x007d, NtQueryDirectoryObject, 56 ) \ - SYSCALL_ENTRY( 0x007e, NtQueryEaFile, 72 ) \ - SYSCALL_ENTRY( 0x007f, NtQueryEvent, 40 ) \ - SYSCALL_ENTRY( 0x0080, NtQueryFullAttributesFile, 16 ) \ - SYSCALL_ENTRY( 0x0081, NtQueryInformationAtom, 40 ) \ - SYSCALL_ENTRY( 0x0082, NtQueryInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x0083, NtQueryInformationJobObject, 40 ) \ - SYSCALL_ENTRY( 0x0084, NtQueryInformationProcess, 40 ) \ - SYSCALL_ENTRY( 0x0085, NtQueryInformationThread, 40 ) \ - SYSCALL_ENTRY( 0x0086, NtQueryInformationToken, 40 ) \ - SYSCALL_ENTRY( 0x0087, NtQueryInstallUILanguage, 8 ) \ - SYSCALL_ENTRY( 0x0088, NtQueryIoCompletion, 40 ) \ - SYSCALL_ENTRY( 0x0089, NtQueryKey, 40 ) \ - SYSCALL_ENTRY( 0x008a, NtQueryLicenseValue, 40 ) \ - SYSCALL_ENTRY( 0x008b, NtQueryMultipleValueKey, 48 ) \ - SYSCALL_ENTRY( 0x008c, NtQueryMutant, 40 ) \ - SYSCALL_ENTRY( 0x008d, NtQueryObject, 40 ) \ - SYSCALL_ENTRY( 0x008e, NtQueryPerformanceCounter, 16 ) \ - SYSCALL_ENTRY( 0x008f, NtQuerySection, 40 ) \ - SYSCALL_ENTRY( 0x0090, NtQuerySecurityObject, 40 ) \ - SYSCALL_ENTRY( 0x0091, NtQuerySemaphore, 40 ) \ - SYSCALL_ENTRY( 0x0092, NtQuerySymbolicLinkObject, 24 ) \ - SYSCALL_ENTRY( 0x0093, NtQuerySystemEnvironmentValue, 32 ) \ - SYSCALL_ENTRY( 0x0094, NtQuerySystemEnvironmentValueEx, 40 ) \ - SYSCALL_ENTRY( 0x0095, NtQuerySystemInformation, 32 ) \ - SYSCALL_ENTRY( 0x0096, NtQuerySystemInformationEx, 48 ) \ - SYSCALL_ENTRY( 0x0097, NtQuerySystemTime, 8 ) \ - SYSCALL_ENTRY( 0x0098, NtQueryTimer, 40 ) \ - SYSCALL_ENTRY( 0x0099, NtQueryTimerResolution, 24 ) \ - SYSCALL_ENTRY( 0x009a, NtQueryValueKey, 48 ) \ - SYSCALL_ENTRY( 0x009b, NtQueryVirtualMemory, 48 ) \ - SYSCALL_ENTRY( 0x009c, NtQueryVolumeInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x009d, NtQueueApcThread, 40 ) \ - SYSCALL_ENTRY( 0x009e, NtRaiseException, 24 ) \ - SYSCALL_ENTRY( 0x009f, NtRaiseHardError, 48 ) \ - SYSCALL_ENTRY( 0x00a0, NtReadFile, 72 ) \ - SYSCALL_ENTRY( 0x00a1, NtReadFileScatter, 72 ) \ - SYSCALL_ENTRY( 0x00a2, NtReadVirtualMemory, 40 ) \ - SYSCALL_ENTRY( 0x00a3, NtRegisterThreadTerminatePort, 8 ) \ - SYSCALL_ENTRY( 0x00a4, NtReleaseKeyedEvent, 32 ) \ - SYSCALL_ENTRY( 0x00a5, NtReleaseMutant, 16 ) \ - SYSCALL_ENTRY( 0x00a6, NtReleaseSemaphore, 24 ) \ - SYSCALL_ENTRY( 0x00a7, NtRemoveIoCompletion, 40 ) \ - SYSCALL_ENTRY( 0x00a8, NtRemoveIoCompletionEx, 48 ) \ - SYSCALL_ENTRY( 0x00a9, NtRemoveProcessDebug, 16 ) \ - SYSCALL_ENTRY( 0x00aa, NtRenameKey, 16 ) \ - SYSCALL_ENTRY( 0x00ab, NtReplaceKey, 24 ) \ - SYSCALL_ENTRY( 0x00ac, NtReplyWaitReceivePort, 32 ) \ - SYSCALL_ENTRY( 0x00ad, NtRequestWaitReplyPort, 24 ) \ - SYSCALL_ENTRY( 0x00ae, NtResetEvent, 16 ) \ - SYSCALL_ENTRY( 0x00af, NtResetWriteWatch, 24 ) \ - SYSCALL_ENTRY( 0x00b0, NtRestoreKey, 24 ) \ - SYSCALL_ENTRY( 0x00b1, NtResumeProcess, 8 ) \ - SYSCALL_ENTRY( 0x00b2, NtResumeThread, 16 ) \ - SYSCALL_ENTRY( 0x00b3, NtRollbackTransaction, 16 ) \ - SYSCALL_ENTRY( 0x00b4, NtSaveKey, 16 ) \ - SYSCALL_ENTRY( 0x00b5, NtSecureConnectPort, 72 ) \ - SYSCALL_ENTRY( 0x00b6, NtSetContextThread, 16 ) \ - SYSCALL_ENTRY( 0x00b7, NtSetDebugFilterState, 24 ) \ - SYSCALL_ENTRY( 0x00b8, NtSetDefaultLocale, 16 ) \ - SYSCALL_ENTRY( 0x00b9, NtSetDefaultUILanguage, 8 ) \ - SYSCALL_ENTRY( 0x00ba, NtSetEaFile, 32 ) \ - SYSCALL_ENTRY( 0x00bb, NtSetEvent, 16 ) \ - SYSCALL_ENTRY( 0x00bc, NtSetInformationDebugObject, 40 ) \ - SYSCALL_ENTRY( 0x00bd, NtSetInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x00be, NtSetInformationJobObject, 32 ) \ - SYSCALL_ENTRY( 0x00bf, NtSetInformationKey, 32 ) \ - SYSCALL_ENTRY( 0x00c0, NtSetInformationObject, 32 ) \ - SYSCALL_ENTRY( 0x00c1, NtSetInformationProcess, 32 ) \ - SYSCALL_ENTRY( 0x00c2, NtSetInformationThread, 32 ) \ - SYSCALL_ENTRY( 0x00c3, NtSetInformationToken, 32 ) \ - SYSCALL_ENTRY( 0x00c4, NtSetInformationVirtualMemory, 48 ) \ - SYSCALL_ENTRY( 0x00c5, NtSetIntervalProfile, 16 ) \ - SYSCALL_ENTRY( 0x00c6, NtSetIoCompletion, 40 ) \ - SYSCALL_ENTRY( 0x00c7, NtSetLdtEntries, 32 ) \ - SYSCALL_ENTRY( 0x00c8, NtSetSecurityObject, 24 ) \ - SYSCALL_ENTRY( 0x00c9, NtSetSystemInformation, 24 ) \ - SYSCALL_ENTRY( 0x00ca, NtSetSystemTime, 16 ) \ - SYSCALL_ENTRY( 0x00cb, NtSetThreadExecutionState, 16 ) \ - SYSCALL_ENTRY( 0x00cc, NtSetTimer, 56 ) \ - SYSCALL_ENTRY( 0x00cd, NtSetTimerResolution, 24 ) \ - SYSCALL_ENTRY( 0x00ce, NtSetValueKey, 48 ) \ - SYSCALL_ENTRY( 0x00cf, NtSetVolumeInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x00d0, NtShutdownSystem, 8 ) \ - SYSCALL_ENTRY( 0x00d1, NtSignalAndWaitForSingleObject, 32 ) \ - SYSCALL_ENTRY( 0x00d2, NtSuspendProcess, 8 ) \ - SYSCALL_ENTRY( 0x00d3, NtSuspendThread, 16 ) \ - SYSCALL_ENTRY( 0x00d4, NtSystemDebugControl, 48 ) \ - SYSCALL_ENTRY( 0x00d5, NtTerminateJobObject, 16 ) \ - SYSCALL_ENTRY( 0x00d6, NtTerminateProcess, 16 ) \ - SYSCALL_ENTRY( 0x00d7, NtTerminateThread, 16 ) \ - SYSCALL_ENTRY( 0x00d8, NtTestAlert, 0 ) \ - SYSCALL_ENTRY( 0x00d9, NtTraceControl, 48 ) \ - SYSCALL_ENTRY( 0x00da, NtUnloadDriver, 8 ) \ - SYSCALL_ENTRY( 0x00db, NtUnloadKey, 8 ) \ - SYSCALL_ENTRY( 0x00dc, NtUnlockFile, 40 ) \ - SYSCALL_ENTRY( 0x00dd, NtUnlockVirtualMemory, 32 ) \ - SYSCALL_ENTRY( 0x00de, NtUnmapViewOfSection, 16 ) \ - SYSCALL_ENTRY( 0x00df, NtUnmapViewOfSectionEx, 24 ) \ - SYSCALL_ENTRY( 0x00e0, NtWaitForAlertByThreadId, 16 ) \ - SYSCALL_ENTRY( 0x00e1, NtWaitForDebugEvent, 32 ) \ - SYSCALL_ENTRY( 0x00e2, NtWaitForKeyedEvent, 32 ) \ - SYSCALL_ENTRY( 0x00e3, NtWaitForMultipleObjects, 40 ) \ - SYSCALL_ENTRY( 0x00e4, NtWaitForSingleObject, 24 ) \ - SYSCALL_ENTRY( 0x00e5, NtWriteFile, 72 ) \ - SYSCALL_ENTRY( 0x00e6, NtWriteFileGather, 72 ) \ - SYSCALL_ENTRY( 0x00e7, NtWriteVirtualMemory, 40 ) \ - SYSCALL_ENTRY( 0x00e8, NtYieldExecution, 0 ) \ - SYSCALL_ENTRY( 0x00e9, wine_nt_to_unix_file_name, 32 ) \ - SYSCALL_ENTRY( 0x00ea, wine_unix_to_nt_file_name, 24 ) + SYSCALL_ENTRY( 0x005a, NtMakePermanentObject, 8 ) \ + SYSCALL_ENTRY( 0x005b, NtMakeTemporaryObject, 8 ) \ + SYSCALL_ENTRY( 0x005c, NtMapViewOfSection, 80 ) \ + SYSCALL_ENTRY( 0x005d, NtMapViewOfSectionEx, 72 ) \ + SYSCALL_ENTRY( 0x005e, NtNotifyChangeDirectoryFile, 72 ) \ + SYSCALL_ENTRY( 0x005f, NtNotifyChangeKey, 80 ) \ + SYSCALL_ENTRY( 0x0060, NtNotifyChangeMultipleKeys, 96 ) \ + SYSCALL_ENTRY( 0x0061, NtOpenDirectoryObject, 24 ) \ + SYSCALL_ENTRY( 0x0062, NtOpenEvent, 24 ) \ + SYSCALL_ENTRY( 0x0063, NtOpenFile, 48 ) \ + SYSCALL_ENTRY( 0x0064, NtOpenIoCompletion, 24 ) \ + SYSCALL_ENTRY( 0x0065, NtOpenJobObject, 24 ) \ + SYSCALL_ENTRY( 0x0066, NtOpenKey, 24 ) \ + SYSCALL_ENTRY( 0x0067, NtOpenKeyEx, 32 ) \ + SYSCALL_ENTRY( 0x0068, NtOpenKeyTransacted, 32 ) \ + SYSCALL_ENTRY( 0x0069, NtOpenKeyTransactedEx, 40 ) \ + SYSCALL_ENTRY( 0x006a, NtOpenKeyedEvent, 24 ) \ + SYSCALL_ENTRY( 0x006b, NtOpenMutant, 24 ) \ + SYSCALL_ENTRY( 0x006c, NtOpenProcess, 32 ) \ + SYSCALL_ENTRY( 0x006d, NtOpenProcessToken, 24 ) \ + SYSCALL_ENTRY( 0x006e, NtOpenProcessTokenEx, 32 ) \ + SYSCALL_ENTRY( 0x006f, NtOpenSection, 24 ) \ + SYSCALL_ENTRY( 0x0070, NtOpenSemaphore, 24 ) \ + SYSCALL_ENTRY( 0x0071, NtOpenSymbolicLinkObject, 24 ) \ + SYSCALL_ENTRY( 0x0072, NtOpenThread, 32 ) \ + SYSCALL_ENTRY( 0x0073, NtOpenThreadToken, 32 ) \ + SYSCALL_ENTRY( 0x0074, NtOpenThreadTokenEx, 40 ) \ + SYSCALL_ENTRY( 0x0075, NtOpenTimer, 24 ) \ + SYSCALL_ENTRY( 0x0076, NtPowerInformation, 40 ) \ + SYSCALL_ENTRY( 0x0077, NtPrivilegeCheck, 24 ) \ + SYSCALL_ENTRY( 0x0078, NtProtectVirtualMemory, 40 ) \ + SYSCALL_ENTRY( 0x0079, NtPulseEvent, 16 ) \ + SYSCALL_ENTRY( 0x007a, NtQueryAttributesFile, 16 ) \ + SYSCALL_ENTRY( 0x007b, NtQueryDefaultLocale, 16 ) \ + SYSCALL_ENTRY( 0x007c, NtQueryDefaultUILanguage, 8 ) \ + SYSCALL_ENTRY( 0x007d, NtQueryDirectoryFile, 88 ) \ + SYSCALL_ENTRY( 0x007e, NtQueryDirectoryObject, 56 ) \ + SYSCALL_ENTRY( 0x007f, NtQueryEaFile, 72 ) \ + SYSCALL_ENTRY( 0x0080, NtQueryEvent, 40 ) \ + SYSCALL_ENTRY( 0x0081, NtQueryFullAttributesFile, 16 ) \ + SYSCALL_ENTRY( 0x0082, NtQueryInformationAtom, 40 ) \ + SYSCALL_ENTRY( 0x0083, NtQueryInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x0084, NtQueryInformationJobObject, 40 ) \ + SYSCALL_ENTRY( 0x0085, NtQueryInformationProcess, 40 ) \ + SYSCALL_ENTRY( 0x0086, NtQueryInformationThread, 40 ) \ + SYSCALL_ENTRY( 0x0087, NtQueryInformationToken, 40 ) \ + SYSCALL_ENTRY( 0x0088, NtQueryInstallUILanguage, 8 ) \ + SYSCALL_ENTRY( 0x0089, NtQueryIoCompletion, 40 ) \ + SYSCALL_ENTRY( 0x008a, NtQueryKey, 40 ) \ + SYSCALL_ENTRY( 0x008b, NtQueryLicenseValue, 40 ) \ + SYSCALL_ENTRY( 0x008c, NtQueryMultipleValueKey, 48 ) \ + SYSCALL_ENTRY( 0x008d, NtQueryMutant, 40 ) \ + SYSCALL_ENTRY( 0x008e, NtQueryObject, 40 ) \ + SYSCALL_ENTRY( 0x008f, NtQueryPerformanceCounter, 16 ) \ + SYSCALL_ENTRY( 0x0090, NtQuerySection, 40 ) \ + SYSCALL_ENTRY( 0x0091, NtQuerySecurityObject, 40 ) \ + SYSCALL_ENTRY( 0x0092, NtQuerySemaphore, 40 ) \ + SYSCALL_ENTRY( 0x0093, NtQuerySymbolicLinkObject, 24 ) \ + SYSCALL_ENTRY( 0x0094, NtQuerySystemEnvironmentValue, 32 ) \ + SYSCALL_ENTRY( 0x0095, NtQuerySystemEnvironmentValueEx, 40 ) \ + SYSCALL_ENTRY( 0x0096, NtQuerySystemInformation, 32 ) \ + SYSCALL_ENTRY( 0x0097, NtQuerySystemInformationEx, 48 ) \ + SYSCALL_ENTRY( 0x0098, NtQuerySystemTime, 8 ) \ + SYSCALL_ENTRY( 0x0099, NtQueryTimer, 40 ) \ + SYSCALL_ENTRY( 0x009a, NtQueryTimerResolution, 24 ) \ + SYSCALL_ENTRY( 0x009b, NtQueryValueKey, 48 ) \ + SYSCALL_ENTRY( 0x009c, NtQueryVirtualMemory, 48 ) \ + SYSCALL_ENTRY( 0x009d, NtQueryVolumeInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x009e, NtQueueApcThread, 40 ) \ + SYSCALL_ENTRY( 0x009f, NtRaiseException, 24 ) \ + SYSCALL_ENTRY( 0x00a0, NtRaiseHardError, 48 ) \ + SYSCALL_ENTRY( 0x00a1, NtReadFile, 72 ) \ + SYSCALL_ENTRY( 0x00a2, NtReadFileScatter, 72 ) \ + SYSCALL_ENTRY( 0x00a3, NtReadVirtualMemory, 40 ) \ + SYSCALL_ENTRY( 0x00a4, NtRegisterThreadTerminatePort, 8 ) \ + SYSCALL_ENTRY( 0x00a5, NtReleaseKeyedEvent, 32 ) \ + SYSCALL_ENTRY( 0x00a6, NtReleaseMutant, 16 ) \ + SYSCALL_ENTRY( 0x00a7, NtReleaseSemaphore, 24 ) \ + SYSCALL_ENTRY( 0x00a8, NtRemoveIoCompletion, 40 ) \ + SYSCALL_ENTRY( 0x00a9, NtRemoveIoCompletionEx, 48 ) \ + SYSCALL_ENTRY( 0x00aa, NtRemoveProcessDebug, 16 ) \ + SYSCALL_ENTRY( 0x00ab, NtRenameKey, 16 ) \ + SYSCALL_ENTRY( 0x00ac, NtReplaceKey, 24 ) \ + SYSCALL_ENTRY( 0x00ad, NtReplyWaitReceivePort, 32 ) \ + SYSCALL_ENTRY( 0x00ae, NtRequestWaitReplyPort, 24 ) \ + SYSCALL_ENTRY( 0x00af, NtResetEvent, 16 ) \ + SYSCALL_ENTRY( 0x00b0, NtResetWriteWatch, 24 ) \ + SYSCALL_ENTRY( 0x00b1, NtRestoreKey, 24 ) \ + SYSCALL_ENTRY( 0x00b2, NtResumeProcess, 8 ) \ + SYSCALL_ENTRY( 0x00b3, NtResumeThread, 16 ) \ + SYSCALL_ENTRY( 0x00b4, NtRollbackTransaction, 16 ) \ + SYSCALL_ENTRY( 0x00b5, NtSaveKey, 16 ) \ + SYSCALL_ENTRY( 0x00b6, NtSecureConnectPort, 72 ) \ + SYSCALL_ENTRY( 0x00b7, NtSetContextThread, 16 ) \ + SYSCALL_ENTRY( 0x00b8, NtSetDebugFilterState, 24 ) \ + SYSCALL_ENTRY( 0x00b9, NtSetDefaultLocale, 16 ) \ + SYSCALL_ENTRY( 0x00ba, NtSetDefaultUILanguage, 8 ) \ + SYSCALL_ENTRY( 0x00bb, NtSetEaFile, 32 ) \ + SYSCALL_ENTRY( 0x00bc, NtSetEvent, 16 ) \ + SYSCALL_ENTRY( 0x00bd, NtSetInformationDebugObject, 40 ) \ + SYSCALL_ENTRY( 0x00be, NtSetInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x00bf, NtSetInformationJobObject, 32 ) \ + SYSCALL_ENTRY( 0x00c0, NtSetInformationKey, 32 ) \ + SYSCALL_ENTRY( 0x00c1, NtSetInformationObject, 32 ) \ + SYSCALL_ENTRY( 0x00c2, NtSetInformationProcess, 32 ) \ + SYSCALL_ENTRY( 0x00c3, NtSetInformationThread, 32 ) \ + SYSCALL_ENTRY( 0x00c4, NtSetInformationToken, 32 ) \ + SYSCALL_ENTRY( 0x00c5, NtSetInformationVirtualMemory, 48 ) \ + SYSCALL_ENTRY( 0x00c6, NtSetIntervalProfile, 16 ) \ + SYSCALL_ENTRY( 0x00c7, NtSetIoCompletion, 40 ) \ + SYSCALL_ENTRY( 0x00c8, NtSetLdtEntries, 32 ) \ + SYSCALL_ENTRY( 0x00c9, NtSetSecurityObject, 24 ) \ + SYSCALL_ENTRY( 0x00ca, NtSetSystemInformation, 24 ) \ + SYSCALL_ENTRY( 0x00cb, NtSetSystemTime, 16 ) \ + SYSCALL_ENTRY( 0x00cc, NtSetThreadExecutionState, 16 ) \ + SYSCALL_ENTRY( 0x00cd, NtSetTimer, 56 ) \ + SYSCALL_ENTRY( 0x00ce, NtSetTimerResolution, 24 ) \ + SYSCALL_ENTRY( 0x00cf, NtSetValueKey, 48 ) \ + SYSCALL_ENTRY( 0x00d0, NtSetVolumeInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x00d1, NtShutdownSystem, 8 ) \ + SYSCALL_ENTRY( 0x00d2, NtSignalAndWaitForSingleObject, 32 ) \ + SYSCALL_ENTRY( 0x00d3, NtSuspendProcess, 8 ) \ + SYSCALL_ENTRY( 0x00d4, NtSuspendThread, 16 ) \ + SYSCALL_ENTRY( 0x00d5, NtSystemDebugControl, 48 ) \ + SYSCALL_ENTRY( 0x00d6, NtTerminateJobObject, 16 ) \ + SYSCALL_ENTRY( 0x00d7, NtTerminateProcess, 16 ) \ + SYSCALL_ENTRY( 0x00d8, NtTerminateThread, 16 ) \ + SYSCALL_ENTRY( 0x00d9, NtTestAlert, 0 ) \ + SYSCALL_ENTRY( 0x00da, NtTraceControl, 48 ) \ + SYSCALL_ENTRY( 0x00db, NtUnloadDriver, 8 ) \ + SYSCALL_ENTRY( 0x00dc, NtUnloadKey, 8 ) \ + SYSCALL_ENTRY( 0x00dd, NtUnlockFile, 40 ) \ + SYSCALL_ENTRY( 0x00de, NtUnlockVirtualMemory, 32 ) \ + SYSCALL_ENTRY( 0x00df, NtUnmapViewOfSection, 16 ) \ + SYSCALL_ENTRY( 0x00e0, NtUnmapViewOfSectionEx, 24 ) \ + SYSCALL_ENTRY( 0x00e1, NtWaitForAlertByThreadId, 16 ) \ + SYSCALL_ENTRY( 0x00e2, NtWaitForDebugEvent, 32 ) \ + SYSCALL_ENTRY( 0x00e3, NtWaitForKeyedEvent, 32 ) \ + SYSCALL_ENTRY( 0x00e4, NtWaitForMultipleObjects, 40 ) \ + SYSCALL_ENTRY( 0x00e5, NtWaitForSingleObject, 24 ) \ + SYSCALL_ENTRY( 0x00e6, NtWriteFile, 72 ) \ + SYSCALL_ENTRY( 0x00e7, NtWriteFileGather, 72 ) \ + SYSCALL_ENTRY( 0x00e8, NtWriteVirtualMemory, 40 ) \ + SYSCALL_ENTRY( 0x00e9, NtYieldExecution, 0 ) \ + SYSCALL_ENTRY( 0x00ea, wine_nt_to_unix_file_name, 32 ) \ + SYSCALL_ENTRY( 0x00eb, wine_unix_to_nt_file_name, 24 ) diff --git a/dlls/ntdll/signal_arm64ec.c b/dlls/ntdll/signal_arm64ec.c index 6f73919c886..a1a71ee71df 100644 --- a/dlls/ntdll/signal_arm64ec.c +++ b/dlls/ntdll/signal_arm64ec.c @@ -611,6 +611,11 @@ NTSTATUS SYSCALL_API NtLockVirtualMemory( HANDLE process, PVOID *addr, SIZE_T *s SYSCALL_FUNC( NtLockVirtualMemory ); }
+NTSTATUS SYSCALL_API NtMakePermanentObject( HANDLE handle ) +{ + SYSCALL_FUNC( NtMakePermanentObject ); +} + NTSTATUS SYSCALL_API NtMakeTemporaryObject( HANDLE handle ) { SYSCALL_FUNC( NtMakeTemporaryObject ); diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 74451ae891c..92171a523a4 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -3163,7 +3163,9 @@ static void test_object_permanence(void) ULONG initial_attr; ACCESS_MASK access; BOOLEAN make_temporary; + BOOLEAN make_permanent; NTSTATUS make_temp_status; + NTSTATUS make_perm_status; } tests[] = { { .name = "permanent object persists", @@ -3185,6 +3187,29 @@ static void test_object_permanence(void) .make_temporary = TRUE, .make_temp_status = STATUS_ACCESS_DENIED, }, + { + .name = "NtMakePermanentObject() succeeds even if already permanent", + .initial_attr = OBJ_PERMANENT, + .access = GENERIC_ALL, + .make_permanent = TRUE, + .make_perm_status = STATUS_SUCCESS, + }, + { + .name = "NtMakePermanentObject() fails w/o DELETE access even if already permanent", + .initial_attr = OBJ_PERMANENT, + .access = EVENT_ALL_ACCESS & ~DELETE, + .make_permanent = TRUE, + .make_perm_status = STATUS_SUCCESS, + }, + { + .name = "NtMakePermanentObject() reverses effect of NtMakeTemporaryObject()", + .initial_attr = OBJ_PERMANENT, + .access = GENERIC_ALL, + .make_temporary = TRUE, + .make_temp_status = STATUS_SUCCESS, + .make_permanent = TRUE, + .make_perm_status = STATUS_SUCCESS, + },
{ .name = "temporary object disappears", @@ -3206,6 +3231,30 @@ static void test_object_permanence(void) .make_temporary = TRUE, .make_temp_status = STATUS_ACCESS_DENIED, }, + { + .name = "NtMakePermanentObject() makes an object persist", + .initial_attr = 0, + .access = GENERIC_ALL, + .make_temporary = FALSE, + .make_permanent = TRUE, + .make_perm_status = STATUS_SUCCESS, + }, + { + .name = "NtMakePermanentObject() fails w/o DELETE access", + .initial_attr = 0, + .access = EVENT_ALL_ACCESS & ~DELETE, + .make_permanent = TRUE, + .make_perm_status = STATUS_SUCCESS, + }, + { + .name = "NtMakePermanentObject() is not blocked by calling NtMakeTemporaryObject() on an already temporary object", + .initial_attr = 0, + .access = GENERIC_ALL, + .make_temporary = TRUE, + .make_temp_status = STATUS_SUCCESS, + .make_permanent = TRUE, + .make_perm_status = STATUS_SUCCESS, + }, }; const struct object_permanence_test *test; HANDLE process_token = NULL, thread_token = NULL; @@ -3319,6 +3368,15 @@ static void test_object_permanence(void) } winetest_pop_context();
+ if (test->make_permanent) + { + NTSTATUS expected_status = creatpermapriv ? test->make_perm_status : STATUS_PRIVILEGE_NOT_HELD; + status = NtMakePermanentObject( handle ); + todo_wine + ok( status == expected_status, "NtMakePermanentObject returned %08lx expected (%08lx)\n", status, expected_status ); + if (!NT_ERROR(status)) is_permanent = TRUE; + } + if (winetest_debug > 1) trace( "NOTE: about to close earlier handle (%p) which should be the last", handle ); NtClose( handle ); diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index 68a861f047a..ae7bc115ffe 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -1272,6 +1272,26 @@ NTSTATUS WINAPI NtQuerySymbolicLinkObject( HANDLE handle, UNICODE_STRING *target }
+/************************************************************************** + * NtMakePermanentObject (NTDLL.@) + */ +NTSTATUS WINAPI NtMakePermanentObject( HANDLE handle ) +{ + unsigned int ret; + + TRACE("%p\n", handle); + + SERVER_START_REQ( set_object_permanence ) + { + req->handle = wine_server_obj_handle( handle ); + req->permanent = 1; + ret = wine_server_call( req ); + } + SERVER_END_REQ; + return ret; +} + + /************************************************************************** * NtMakeTemporaryObject (NTDLL.@) */ diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index d098cf19c78..996777fd7fd 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -799,7 +799,6 @@ @ stdcall NtFsControlFile(long long ptr ptr ptr long ptr long ptr long) @ stub NtGlobalFlag @ stdcall NtLockFile(long long ptr ptr ptr ptr ptr ptr long long) -@ stub NtMakePermanentObject @ stdcall NtMapViewOfSection(long long ptr long long ptr ptr long long long) @ stdcall NtNotifyChangeDirectoryFile(long long ptr ptr ptr ptr long long long) @ stdcall NtOpenFile(ptr long ptr ptr long long) @@ -1446,6 +1445,7 @@ @ stdcall -private ZwLoadKey(ptr ptr) NtLoadKey @ stdcall -private ZwLockFile(long long ptr ptr ptr ptr ptr ptr long long) NtLockFile @ stdcall -private ZwLockVirtualMemory(long ptr ptr long) NtLockVirtualMemory +@ stdcall ZwMakePermanentObject(long) NtMakePermanentObject @ stdcall ZwMakeTemporaryObject(long) NtMakeTemporaryObject @ stdcall ZwMapViewOfSection(long long ptr long long ptr ptr long long long) NtMapViewOfSection @ stdcall -private ZwNotifyChangeDirectoryFile(long long ptr ptr ptr ptr long long long) NtNotifyChangeDirectoryFile diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c index 681aab7e827..628184ff7c1 100644 --- a/dlls/wow64/sync.c +++ b/dlls/wow64/sync.c @@ -534,6 +534,17 @@ NTSTATUS WINAPI wow64_NtListenPort( UINT *args ) }
+/********************************************************************** + * wow64_NtMakePermanentObject + */ +NTSTATUS WINAPI wow64_NtMakePermanentObject( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + + return NtMakePermanentObject( handle ); +} + + /********************************************************************** * wow64_NtMakeTemporaryObject */ diff --git a/include/winternl.h b/include/winternl.h index 6b4009b913e..c39d6427e52 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -4480,6 +4480,7 @@ NTSYSAPI NTSTATUS WINAPI NtLoadKey2(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES NTSYSAPI NTSTATUS WINAPI NtLoadKeyEx(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *,ULONG,HANDLE,HANDLE,ACCESS_MASK,HANDLE *,IO_STATUS_BLOCK *); NTSYSAPI NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN); NTSYSAPI NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG); +NTSYSAPI NTSTATUS WINAPI NtMakePermanentObject(HANDLE); NTSYSAPI NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE); NTSYSAPI NTSTATUS WINAPI NtMapViewOfSection(HANDLE,HANDLE,PVOID*,ULONG_PTR,SIZE_T,const LARGE_INTEGER*,SIZE_T*,SECTION_INHERIT,ULONG,ULONG); NTSYSAPI NTSTATUS WINAPI NtMapViewOfSectionEx(HANDLE,HANDLE,PVOID*,const LARGE_INTEGER*,SIZE_T*,ULONG,ULONG,MEM_EXTENDED_PARAMETER*,ULONG);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=143951
Your paranoid android.
=== debian11b (64 bit WoW report) ===
secur32: schannel.c:538: Test failed: cert_cnt = 2