Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- configure | 2 + configure.ac | 1 + dlls/sechost/Makefile.in | 3 + dlls/sechost/sechost.spec | 208 ++++++++++++++++++++++++++++++++++++++ tools/make_specfiles | 1 + 5 files changed, 215 insertions(+) create mode 100644 dlls/sechost/Makefile.in create mode 100644 dlls/sechost/sechost.spec
diff --git a/configure b/configure index 511837c1c73..1f4080fc545 100755 --- a/configure +++ b/configure @@ -1556,6 +1556,7 @@ enable_schedsvc enable_scrobj enable_scrrun enable_scsiport_sys +enable_sechost enable_secur32 enable_security enable_sensapi @@ -20951,6 +20952,7 @@ wine_fn_config_makefile dlls/scrobj/tests enable_tests wine_fn_config_makefile dlls/scrrun enable_scrrun wine_fn_config_makefile dlls/scrrun/tests enable_tests wine_fn_config_makefile dlls/scsiport.sys enable_scsiport_sys +wine_fn_config_makefile dlls/sechost enable_sechost wine_fn_config_makefile dlls/secur32 enable_secur32 wine_fn_config_makefile dlls/secur32/tests enable_tests wine_fn_config_makefile dlls/security enable_security diff --git a/configure.ac b/configure.ac index 00b3f38d4aa..ce2c94eca29 100644 --- a/configure.ac +++ b/configure.ac @@ -3641,6 +3641,7 @@ WINE_CONFIG_MAKEFILE(dlls/scrobj/tests) WINE_CONFIG_MAKEFILE(dlls/scrrun) WINE_CONFIG_MAKEFILE(dlls/scrrun/tests) WINE_CONFIG_MAKEFILE(dlls/scsiport.sys) +WINE_CONFIG_MAKEFILE(dlls/sechost) WINE_CONFIG_MAKEFILE(dlls/secur32) WINE_CONFIG_MAKEFILE(dlls/secur32/tests) WINE_CONFIG_MAKEFILE(dlls/security) diff --git a/dlls/sechost/Makefile.in b/dlls/sechost/Makefile.in new file mode 100644 index 00000000000..d326188ad3e --- /dev/null +++ b/dlls/sechost/Makefile.in @@ -0,0 +1,3 @@ +MODULE = sechost.dll + +EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/sechost/sechost.spec b/dlls/sechost/sechost.spec new file mode 100644 index 00000000000..a72f79cd8a0 --- /dev/null +++ b/dlls/sechost/sechost.spec @@ -0,0 +1,208 @@ +@ stub I_ScSetServiceBitsA +@ stub I_ScSetServiceBitsW +@ stub AuditComputeEffectivePolicyBySid +@ stub AuditEnumerateCategories +@ stub AuditEnumeratePerUserPolicy +@ stub AuditEnumerateSubCategories +@ stub AuditFree +@ stub AuditLookupCategoryNameW +@ stub AuditLookupSubCategoryNameW +@ stub AuditQueryGlobalSaclW +@ stub AuditQueryPerUserPolicy +@ stub AuditQuerySecurity +@ stdcall AuditQuerySystemPolicy(ptr long ptr) advapi32.AuditQuerySystemPolicy +@ stub AuditSetGlobalSaclW +@ stub AuditSetPerUserPolicy +@ stub AuditSetSecurity +@ stub AuditSetSystemPolicy +@ stub BuildSecurityDescriptorForSharingAccess +@ stub BuildSecurityDescriptorForSharingAccessEx +@ stub CapabilityCheck +@ stub CapabilityCheckForSingleSessionSku +@ stdcall ChangeServiceConfig2A(long long ptr) advapi32.ChangeServiceConfig2A +@ stdcall ChangeServiceConfig2W(long long ptr) advapi32.ChangeServiceConfig2W +@ stdcall ChangeServiceConfigA(long long long long wstr str ptr str str str str) advapi32.ChangeServiceConfigA +@ stdcall ChangeServiceConfigW(long long long long wstr wstr ptr wstr wstr wstr wstr) advapi32.ChangeServiceConfigW +@ stdcall CloseServiceHandle(long) advapi32.CloseServiceHandle +@ stdcall CloseTrace(int64) advapi32.CloseTrace +@ stdcall ControlService(long long ptr) advapi32.ControlService +@ stub ControlServiceExA +@ stub ControlServiceExW +@ stdcall ControlTraceA(int64 str ptr long) advapi32.ControlTraceA +@ stdcall ControlTraceW(int64 wstr ptr long) advapi32.ControlTraceW +@ stub ConvertSDToStringSDRootDomainW +@ stdcall ConvertSecurityDescriptorToStringSecurityDescriptorW(ptr long long ptr ptr) advapi32.ConvertSecurityDescriptorToStringSecurityDescriptorW +@ stdcall ConvertSidToStringSidW(ptr ptr) advapi32.ConvertSidToStringSidW +@ stub ConvertStringSDToSDDomainA +@ stub ConvertStringSDToSDDomainW +@ stub ConvertStringSDToSDRootDomainW +@ stdcall ConvertStringSecurityDescriptorToSecurityDescriptorW(wstr long ptr ptr) advapi32.ConvertStringSecurityDescriptorToSecurityDescriptorW +@ stdcall ConvertStringSidToSidW(ptr ptr) advapi32.ConvertStringSidToSidW +@ stdcall CreateServiceA(long str str long long long long str str ptr str str str) advapi32.CreateServiceA +@ stub CreateServiceEx +@ stdcall CreateServiceW(long wstr wstr long long long long wstr wstr ptr wstr wstr wstr) advapi32.CreateServiceW +@ stub CredBackupCredentials +@ stdcall CredDeleteA(str long long) advapi32.CredDeleteA +@ stdcall CredDeleteW(wstr long long) advapi32.CredDeleteW +@ stub CredEncryptAndMarshalBinaryBlob +@ stdcall CredEnumerateA(str long ptr ptr) advapi32.CredEnumerateA +@ stdcall CredEnumerateW(wstr long ptr ptr) advapi32.CredEnumerateW +@ stub CredFindBestCredentialA +@ stub CredFindBestCredentialW +@ stdcall CredFree(ptr) advapi32.CredFree +@ stdcall CredGetSessionTypes(long ptr) advapi32.CredGetSessionTypes +@ stub CredGetTargetInfoA +@ stub CredGetTargetInfoW +@ stdcall CredIsMarshaledCredentialW(wstr) advapi32.CredIsMarshaledCredentialW +@ stub CredIsProtectedA +@ stub CredIsProtectedW +@ stdcall CredMarshalCredentialA(long ptr ptr) advapi32.CredMarshalCredentialA +@ stdcall CredMarshalCredentialW(long ptr ptr) advapi32.CredMarshalCredentialW +@ stub CredParseUserNameWithType +@ stub CredProfileLoaded +@ stub CredProfileLoadedEx +@ stub CredProfileUnloaded +@ stub CredProtectA +@ stub CredProtectW +@ stdcall CredReadA(str long long ptr) advapi32.CredReadA +@ stub CredReadByTokenHandle +@ stdcall CredReadDomainCredentialsA(ptr long ptr ptr) advapi32.CredReadDomainCredentialsA +@ stdcall CredReadDomainCredentialsW(ptr long ptr ptr) advapi32.CredReadDomainCredentialsW +@ stdcall CredReadW(wstr long long ptr) advapi32.CredReadW +@ stub CredRestoreCredentials +@ stdcall CredUnmarshalCredentialA(str ptr ptr) advapi32.CredUnmarshalCredentialA +@ stdcall CredUnmarshalCredentialW(wstr ptr ptr) advapi32.CredUnmarshalCredentialW +@ stub CredUnprotectA +@ stub CredUnprotectW +@ stdcall CredWriteA(ptr long) advapi32.CredWriteA +@ stub CredWriteDomainCredentialsA +@ stub CredWriteDomainCredentialsW +@ stdcall CredWriteW(ptr long) advapi32.CredWriteW +@ stub CredpConvertCredential +@ stub CredpConvertOneCredentialSize +@ stub CredpConvertTargetInfo +@ stub CredpDecodeCredential +@ stub CredpEncodeCredential +@ stub CredpEncodeSecret +@ stdcall DeleteService(long) advapi32.DeleteService +@ stdcall EnableTraceEx2(int64 ptr long long int64 int64 long ptr) advapi32.EnableTraceEx2 +@ stdcall EnumDependentServicesW(long long ptr long ptr ptr) advapi32.EnumDependentServicesW +@ stdcall EnumServicesStatusExW(long long long long ptr long ptr ptr ptr wstr) advapi32.EnumServicesStatusExW +@ stub EnumerateIdentityProviders +@ stub EnumerateTraceGuidsEx +@ stub EtwQueryRealtimeConsumer +@ stub EventAccessControl +@ stub EventAccessQuery +@ stub EventAccessRemove +@ stub FreeTransientObjectSecurityDescriptor +@ stub GetDefaultIdentityProvider +@ stub GetIdentityProviderInfoByGUID +@ stub GetIdentityProviderInfoByName +@ stub GetServiceDirectory +@ stdcall GetServiceDisplayNameW(ptr wstr ptr ptr) advapi32.GetServiceDisplayNameW +@ stdcall GetServiceKeyNameW(long wstr ptr ptr) advapi32.GetServiceKeyNameW +@ stub GetServiceRegistryStateKey +@ stub I_QueryTagInformation +@ stub I_RegisterSvchostNotificationCallback +@ stub I_ScBroadcastServiceControlMessage +@ stub I_ScIsSecurityProcess +@ stub I_ScPnPGetServiceName +@ stub I_ScQueryServiceConfig +@ stub I_ScRegisterDeviceNotification +@ stub I_ScRegisterPreshutdownRestart +@ stub I_ScReparseServiceDatabase +@ stub I_ScRpcBindA +@ stub I_ScRpcBindW +@ stub I_ScSendPnPMessage +@ stub I_ScSendTSMessage +@ stub I_ScUnregisterDeviceNotification +@ stub I_ScValidatePnPService +@ stub LocalGetConditionForString +@ stub LocalGetReferencedTokenTypesForCondition +@ stub LocalGetStringForCondition +@ stub LocalRpcBindingCreateWithSecurity +@ stub LocalRpcBindingSetAuthInfoEx +@ stub LookupAccountNameLocalA +@ stub LookupAccountNameLocalW +@ stdcall LookupAccountSidLocalA(ptr ptr ptr ptr ptr ptr) advapi32.LookupAccountSidLocalA +@ stdcall LookupAccountSidLocalW(ptr ptr ptr ptr ptr ptr) advapi32.LookupAccountSidLocalW +@ stdcall LsaAddAccountRights(ptr ptr ptr long) advapi32.LsaAddAccountRights +@ stdcall LsaClose(ptr) advapi32.LsaClose +@ stub LsaCreateSecret +@ stub LsaDelete +@ stdcall LsaEnumerateAccountRights(ptr ptr ptr ptr) advapi32.LsaEnumerateAccountRights +@ stdcall LsaEnumerateAccountsWithUserRight(ptr ptr ptr ptr) advapi32.LsaEnumerateAccountsWithUserRight +@ stdcall LsaFreeMemory(ptr) advapi32.LsaFreeMemory +@ stub LsaICLookupNames +@ stub LsaICLookupNamesWithCreds +@ stub LsaICLookupSids +@ stub LsaICLookupSidsWithCreds +@ stub LsaLookupClose +@ stub LsaLookupFreeMemory +@ stub LsaLookupGetDomainInfo +@ stub LsaLookupManageSidNameMapping +@ stdcall LsaLookupNames2(ptr long long ptr ptr ptr) advapi32.LsaLookupNames2 +@ stub LsaLookupOpenLocalPolicy +@ stdcall LsaLookupSids(ptr long ptr ptr ptr) advapi32.LsaLookupSids +@ stub LsaLookupSids2 +@ stub LsaLookupTranslateNames +@ stub LsaLookupTranslateSids +@ stub LsaLookupUserAccountType +@ stdcall LsaOpenPolicy(long ptr long long) advapi32.LsaOpenPolicy +@ stub LsaOpenSecret +@ stdcall LsaQueryInformationPolicy(ptr long ptr) advapi32.LsaQueryInformationPolicy +@ stub LsaQuerySecret +@ stdcall LsaRemoveAccountRights(ptr ptr long ptr long) advapi32.LsaRemoveAccountRights +@ stdcall LsaRetrievePrivateData(ptr ptr ptr) advapi32.LsaRetrievePrivateData +@ stdcall LsaSetInformationPolicy(long long ptr) advapi32.LsaSetInformationPolicy +@ stdcall LsaSetSecret(ptr ptr ptr) advapi32.LsaSetSecret +@ stdcall LsaStorePrivateData(ptr ptr ptr) advapi32.LsaStorePrivateData +@ stub NotifyServiceStatusChange +@ stub NotifyServiceStatusChangeA +@ stdcall NotifyServiceStatusChangeW(ptr long ptr) advapi32.NotifyServiceStatusChangeW +@ stdcall OpenSCManagerA(str str long) advapi32.OpenSCManagerA +@ stdcall OpenSCManagerW(wstr wstr long) advapi32.OpenSCManagerW +@ stdcall OpenServiceA(long str long) advapi32.OpenServiceA +@ stdcall OpenServiceW(long wstr long) advapi32.OpenServiceW +@ stdcall -ret64 OpenTraceW(ptr) advapi32.OpenTraceW +@ stdcall ProcessTrace(ptr long ptr ptr) advapi32.ProcessTrace +@ stdcall QueryAllTracesA(ptr long ptr) advapi32.QueryAllTracesA +@ stdcall QueryAllTracesW(ptr long ptr) advapi32.QueryAllTracesW +@ stub QueryLocalUserServiceName +@ stdcall QueryServiceConfig2A(long long ptr long ptr) advapi32.QueryServiceConfig2A +@ stdcall QueryServiceConfig2W(long long ptr long ptr) advapi32.QueryServiceConfig2W +@ stdcall QueryServiceConfigA(long ptr long ptr) advapi32.QueryServiceConfigA +@ stdcall QueryServiceConfigW(long ptr long ptr) advapi32.QueryServiceConfigW +@ stub QueryServiceDynamicInformation +@ stdcall QueryServiceObjectSecurity(long long ptr long ptr) advapi32.QueryServiceObjectSecurity +@ stdcall QueryServiceStatus(long ptr) advapi32.QueryServiceStatus +@ stdcall QueryServiceStatusEx(long long ptr long ptr) advapi32.QueryServiceStatusEx +@ stub QueryTraceProcessingHandle +@ stub QueryTransientObjectSecurityDescriptor +@ stub QueryUserServiceName +@ stub QueryUserServiceNameForContext +@ stdcall RegisterServiceCtrlHandlerA(str ptr) advapi32.RegisterServiceCtrlHandlerA +@ stdcall RegisterServiceCtrlHandlerExA(str ptr ptr) advapi32.RegisterServiceCtrlHandlerExA +@ stdcall RegisterServiceCtrlHandlerExW(wstr ptr ptr) advapi32.RegisterServiceCtrlHandlerExW +@ stdcall RegisterServiceCtrlHandlerW(wstr ptr) advapi32.RegisterServiceCtrlHandlerW +@ stdcall RegisterTraceGuidsA(ptr ptr ptr long ptr str str ptr) advapi32.RegisterTraceGuidsA +@ stub ReleaseIdentityProviderEnumContext +@ stub RemoveTraceCallback +@ stub RpcClientCapabilityCheck +@ stub SetLocalRpcServerInterfaceSecurity +@ stub SetLocalRpcServerProtseqSecurity +@ stdcall SetServiceObjectSecurity(long long ptr) advapi32.SetServiceObjectSecurity +@ stdcall SetServiceStatus(long ptr) advapi32.SetServiceStatus +@ stub SetTraceCallback +@ stdcall StartServiceA(long long ptr) advapi32.StartServiceA +@ stdcall StartServiceCtrlDispatcherA(ptr) advapi32.StartServiceCtrlDispatcherA +@ stdcall StartServiceCtrlDispatcherW(ptr) advapi32.StartServiceCtrlDispatcherW +@ stdcall StartServiceW(long long ptr) advapi32.StartServiceW +@ stdcall StartTraceA(ptr str ptr) advapi32.StartTraceA +@ stdcall StartTraceW(ptr wstr ptr) advapi32.StartTraceW +@ stdcall StopTraceW(int64 wstr ptr) advapi32.StopTraceW +@ stub SubscribeServiceChangeNotifications +@ stub TraceQueryInformation +@ stdcall TraceSetInformation(int64 long ptr long) advapi32.TraceSetInformation +@ stub UnsubscribeServiceChangeNotifications +@ stub WaitServiceState diff --git a/tools/make_specfiles b/tools/make_specfiles index 95b210752ca..6ce990c107f 100755 --- a/tools/make_specfiles +++ b/tools/make_specfiles @@ -148,6 +148,7 @@ my @dll_groups = "api-ms-win-service-private-l1-1-1", "api-ms-win-service-winsvc-l1-1-0", "api-ms-win-service-winsvc-l1-2-0", + "sechost", ], [ "authz",
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/advapi32/Makefile.in | 2 +- dlls/advapi32/advapi32.spec | 24 +++--- dlls/advapi32/eventlog.c | 141 -------------------------------- dlls/sechost/Makefile.in | 5 ++ dlls/sechost/sechost.spec | 26 +++--- dlls/sechost/trace.c | 155 ++++++++++++++++++++++++++++++++++++ 6 files changed, 186 insertions(+), 167 deletions(-) create mode 100644 dlls/sechost/trace.c
diff --git a/dlls/advapi32/Makefile.in b/dlls/advapi32/Makefile.in index e530adac4e8..33dbe851c9f 100644 --- a/dlls/advapi32/Makefile.in +++ b/dlls/advapi32/Makefile.in @@ -1,7 +1,7 @@ EXTRADEFS = -D_ADVAPI32_ MODULE = advapi32.dll IMPORTLIB = advapi32 -IMPORTS = kernelbase +IMPORTS = kernelbase sechost DELAYIMPORTS = rpcrt4 EXTRALIBS = $(SECURITY_LIBS)
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index 5a4344852ee..cb3e856ce98 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -102,14 +102,14 @@ @ stdcall CloseEventLog (long) @ stdcall CloseServiceHandle(long) # @ stub CloseThreadWaitChainSession -@ stdcall CloseTrace(int64) +@ stdcall -import CloseTrace(int64) @ stdcall CommandLineFromMsiDescriptor(wstr ptr ptr) # @ stub ComputeAccessTokenFromCodeAuthzLevel @ stdcall ControlService(long long ptr) # @ stub ControlServiceExA # @ stub ControlServiceExW -@ stdcall ControlTraceA(int64 str ptr long) -@ stdcall ControlTraceW(int64 wstr ptr long) +@ stdcall -import ControlTraceA(int64 str ptr long) +@ stdcall -import ControlTraceW(int64 wstr ptr long) # @ stub ConvertAccessToSecurityDescriptorA # @ stub ConvertAccessToSecurityDescriptorW # @ stub ConvertSDToStringSDDomainW @@ -265,7 +265,7 @@ @ stub ElfReportEventW @ stdcall EnableTrace(long long long ptr int64) @ stdcall EnableTraceEx(ptr ptr int64 long long int64 int64 long ptr) -@ stdcall EnableTraceEx2(int64 ptr long long int64 int64 long ptr) +@ stdcall -import EnableTraceEx2(int64 ptr long long int64 int64 long ptr) @ stdcall EncryptFileA(str) @ stdcall EncryptFileW(wstr) # @ stub EncryptedFileKeyInfo @@ -550,7 +550,7 @@ @ stdcall -import OpenThreadToken(long long long ptr) # @ stub OpenThreadWaitChainSession @ stdcall -ret64 OpenTraceA(ptr) -@ stdcall -ret64 OpenTraceW(ptr) +@ stdcall -ret64 -import OpenTraceW(ptr) # @ stub OperationEnd # @ stub OperationStart # @ stub PerfAddCounters @@ -587,9 +587,9 @@ @ stdcall -import PrivilegedServiceAuditAlarmW(wstr wstr long ptr long) # @ stub ProcessIdleTasks # @ stub ProcessIdleTasksW -@ stdcall ProcessTrace(ptr long ptr ptr) -@ stdcall QueryAllTracesA(ptr long ptr) -@ stdcall QueryAllTracesW(ptr long ptr) +@ stdcall -import ProcessTrace(ptr long ptr ptr) +@ stdcall -import QueryAllTracesA(ptr long ptr) +@ stdcall -import QueryAllTracesW(ptr long ptr) # @ stub QueryLocalUserServiceName # @ stub QueryRecoveryAgentsOnEncryptedFile # @ stub QuerySecurityAccessMask @@ -772,10 +772,10 @@ @ stdcall StartServiceCtrlDispatcherA(ptr) @ stdcall StartServiceCtrlDispatcherW(ptr) @ stdcall StartServiceW(long long ptr) -@ stdcall StartTraceA(ptr str ptr) -@ stdcall StartTraceW(ptr wstr ptr) +@ stdcall -import StartTraceA(ptr str ptr) +@ stdcall -import StartTraceW(ptr wstr ptr) @ stdcall StopTraceA(int64 str ptr) -@ stdcall StopTraceW(int64 wstr ptr) +@ stdcall -import StopTraceW(int64 wstr ptr) @ stdcall SynchronizeWindows31FilesAndWindowsNTRegistry(long long long long) @ stdcall SystemFunction001(ptr ptr ptr) @ stdcall SystemFunction002(ptr ptr ptr) @@ -820,7 +820,7 @@ @ varargs TraceMessage(int64 long ptr long) ntdll.EtwTraceMessage @ stdcall TraceMessageVa(int64 long ptr long ptr) ntdll.EtwTraceMessageVa # @ stub TraceQueryInformation -@ stdcall TraceSetInformation(int64 long ptr long) +@ stdcall -import TraceSetInformation(int64 long ptr long) # @ stub TreeResetNamedSecurityInfoA @ stdcall TreeResetNamedSecurityInfoW(wstr long long ptr ptr ptr ptr long ptr long ptr) # @ stub TreeSetNamedSecurityInfoA diff --git a/dlls/advapi32/eventlog.c b/dlls/advapi32/eventlog.c index 6f8d26b5161..e9b04585689 100644 --- a/dlls/advapi32/eventlog.c +++ b/dlls/advapi32/eventlog.c @@ -164,30 +164,6 @@ BOOL WINAPI CloseEventLog( HANDLE hEventLog ) return TRUE; }
-/****************************************************************************** - * ControlTraceW [ADVAPI32.@] - * - * Control a givel event trace session - * - */ -ULONG WINAPI ControlTraceW( TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control ) -{ - FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(hSession), debugstr_w(SessionName), Properties, control); - return ERROR_SUCCESS; -} - -/****************************************************************************** - * ControlTraceA [ADVAPI32.@] - * - * See ControlTraceW. - * - */ -ULONG WINAPI ControlTraceA( TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control ) -{ - FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(hSession), debugstr_a(SessionName), Properties, control); - return ERROR_SUCCESS; -} - /****************************************************************************** * FlushTraceA [ADVAPI32.@] */ @@ -238,20 +214,6 @@ ULONG WINAPI EnableTraceEx( LPCGUID provider, LPCGUID source, TRACEHANDLE hSessi return ERROR_SUCCESS; }
-/****************************************************************************** - * EnableTraceEx2 [ADVAPI32.@] - */ -ULONG WINAPI EnableTraceEx2( TRACEHANDLE handle, LPCGUID provider, ULONG control, UCHAR level, - ULONGLONG match_any, ULONGLONG match_all, ULONG timeout, - PENABLE_TRACE_PARAMETERS params ) -{ - FIXME("(%s, %s, %u, %u, %s, %s, %u, %p): stub\n", wine_dbgstr_longlong(handle), - debugstr_guid(provider), control, level, wine_dbgstr_longlong(match_any), - wine_dbgstr_longlong(match_all), timeout, params); - - return ERROR_SUCCESS; -} - /****************************************************************************** * EnableTrace [ADVAPI32.@] */ @@ -523,33 +485,6 @@ HANDLE WINAPI OpenEventLogW( LPCWSTR uncname, LPCWSTR source ) return (HANDLE)0xcafe4242; }
-/****************************************************************************** - * QueryAllTracesW [ADVAPI32.@] - * - * Query information for started event trace sessions - * - */ -ULONG WINAPI QueryAllTracesW( PEVENT_TRACE_PROPERTIES * parray, ULONG arraycount, PULONG psessioncount ) -{ - FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount); - - if (psessioncount) *psessioncount = 0; - return ERROR_SUCCESS; -} - -/****************************************************************************** - * QueryAllTracesA [ADVAPI32.@] - * - * See QueryAllTracesW. - */ -ULONG WINAPI QueryAllTracesA( PEVENT_TRACE_PROPERTIES * parray, ULONG arraycount, PULONG psessioncount ) -{ - FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount); - - if (psessioncount) *psessioncount = 0; - return ERROR_SUCCESS; -} - /****************************************************************************** * ReadEventLogA [ADVAPI32.@] * @@ -727,44 +662,6 @@ BOOL WINAPI ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dw return TRUE; }
-/****************************************************************************** - * StartTraceW [ADVAPI32.@] - * - * Register and start an event trace session - * - */ -ULONG WINAPI StartTraceW( PTRACEHANDLE pSessionHandle, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties ) -{ - FIXME("(%p, %s, %p) stub\n", pSessionHandle, debugstr_w(SessionName), Properties); - if (pSessionHandle) *pSessionHandle = 0xcafe4242; - return ERROR_SUCCESS; -} - -/****************************************************************************** - * StartTraceA [ADVAPI32.@] - * - * See StartTraceW. - * - */ -ULONG WINAPI StartTraceA( PTRACEHANDLE pSessionHandle, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties ) -{ - FIXME("(%p, %s, %p) stub\n", pSessionHandle, debugstr_a(SessionName), Properties); - if (pSessionHandle) *pSessionHandle = 0xcafe4242; - return ERROR_SUCCESS; -} - -/****************************************************************************** - * StopTraceW [ADVAPI32.@] - * - * Stop an event trace session - * - */ -ULONG WINAPI StopTraceW( TRACEHANDLE session, LPCWSTR session_name, PEVENT_TRACE_PROPERTIES properties ) -{ - FIXME("(%s, %s, %p) stub\n", wine_dbgstr_longlong(session), debugstr_w(session_name), properties); - return ERROR_SUCCESS; -} - /****************************************************************************** * StopTraceA [ADVAPI32.@] * @@ -798,36 +695,6 @@ TRACEHANDLE WINAPI OpenTraceA( PEVENT_TRACE_LOGFILEA logfile ) return INVALID_PROCESSTRACE_HANDLE; }
-/****************************************************************************** - * OpenTraceW [ADVAPI32.@] - */ -TRACEHANDLE WINAPI OpenTraceW( PEVENT_TRACE_LOGFILEW logfile ) -{ - static int once; - - if (!once++) FIXME("%p: stub\n", logfile); - SetLastError(ERROR_ACCESS_DENIED); - return INVALID_PROCESSTRACE_HANDLE; -} - -/****************************************************************************** - * ProcessTrace [ADVAPI32.@] - */ -ULONG WINAPI ProcessTrace( PTRACEHANDLE HandleArray, ULONG HandleCount, LPFILETIME StartTime, LPFILETIME EndTime) -{ - FIXME("%p %u %p %p: stub\n", HandleArray, HandleCount, StartTime, EndTime); - return ERROR_CALL_NOT_IMPLEMENTED; -} - -/****************************************************************************** - * CloseTrace [ADVAPI32.@] - */ -ULONG WINAPI CloseTrace( TRACEHANDLE handle ) -{ - FIXME("%s: stub\n", wine_dbgstr_longlong(handle)); - return ERROR_INVALID_HANDLE; -} - /****************************************************************************** * EnumerateTraceGuids [ADVAPI32.@] */ @@ -838,11 +705,3 @@ ULONG WINAPI EnumerateTraceGuids(PTRACE_GUID_PROPERTIES *propertiesarray, return ERROR_INVALID_PARAMETER; }
-/****************************************************************************** - * TraceSetInformation [ADVAPI32.@] - */ -ULONG WINAPI TraceSetInformation(TRACEHANDLE handle, TRACE_INFO_CLASS infoclass, VOID* info, ULONG len) -{ - FIXME("%s %d %p %d: stub\n", wine_dbgstr_longlong(handle), infoclass, info, len); - return ERROR_CALL_NOT_IMPLEMENTED; -} diff --git a/dlls/sechost/Makefile.in b/dlls/sechost/Makefile.in index d326188ad3e..9f573ccc2f9 100644 --- a/dlls/sechost/Makefile.in +++ b/dlls/sechost/Makefile.in @@ -1,3 +1,8 @@ MODULE = sechost.dll +IMPORTLIB = sechost +IMPORTS = kernelbase
EXTRADLLFLAGS = -mno-cygwin + +C_SRCS = \ + trace.c diff --git a/dlls/sechost/sechost.spec b/dlls/sechost/sechost.spec index a72f79cd8a0..9261ee721bf 100644 --- a/dlls/sechost/sechost.spec +++ b/dlls/sechost/sechost.spec @@ -24,12 +24,12 @@ @ stdcall ChangeServiceConfigA(long long long long wstr str ptr str str str str) advapi32.ChangeServiceConfigA @ stdcall ChangeServiceConfigW(long long long long wstr wstr ptr wstr wstr wstr wstr) advapi32.ChangeServiceConfigW @ stdcall CloseServiceHandle(long) advapi32.CloseServiceHandle -@ stdcall CloseTrace(int64) advapi32.CloseTrace +@ stdcall CloseTrace(int64) @ stdcall ControlService(long long ptr) advapi32.ControlService @ stub ControlServiceExA @ stub ControlServiceExW -@ stdcall ControlTraceA(int64 str ptr long) advapi32.ControlTraceA -@ stdcall ControlTraceW(int64 wstr ptr long) advapi32.ControlTraceW +@ stdcall ControlTraceA(int64 str ptr long) +@ stdcall ControlTraceW(int64 wstr ptr long) @ stub ConvertSDToStringSDRootDomainW @ stdcall ConvertSecurityDescriptorToStringSecurityDescriptorW(ptr long long ptr ptr) advapi32.ConvertSecurityDescriptorToStringSecurityDescriptorW @ stdcall ConvertSidToStringSidW(ptr ptr) advapi32.ConvertSidToStringSidW @@ -85,7 +85,7 @@ @ stub CredpEncodeCredential @ stub CredpEncodeSecret @ stdcall DeleteService(long) advapi32.DeleteService -@ stdcall EnableTraceEx2(int64 ptr long long int64 int64 long ptr) advapi32.EnableTraceEx2 +@ stdcall EnableTraceEx2(int64 ptr long long int64 int64 long ptr) @ stdcall EnumDependentServicesW(long long ptr long ptr ptr) advapi32.EnumDependentServicesW @ stdcall EnumServicesStatusExW(long long long long ptr long ptr ptr ptr wstr) advapi32.EnumServicesStatusExW @ stub EnumerateIdentityProviders @@ -164,10 +164,10 @@ @ stdcall OpenSCManagerW(wstr wstr long) advapi32.OpenSCManagerW @ stdcall OpenServiceA(long str long) advapi32.OpenServiceA @ stdcall OpenServiceW(long wstr long) advapi32.OpenServiceW -@ stdcall -ret64 OpenTraceW(ptr) advapi32.OpenTraceW -@ stdcall ProcessTrace(ptr long ptr ptr) advapi32.ProcessTrace -@ stdcall QueryAllTracesA(ptr long ptr) advapi32.QueryAllTracesA -@ stdcall QueryAllTracesW(ptr long ptr) advapi32.QueryAllTracesW +@ stdcall -ret64 OpenTraceW(ptr) +@ stdcall ProcessTrace(ptr long ptr ptr) +@ stdcall QueryAllTracesA(ptr long ptr) +@ stdcall QueryAllTracesW(ptr long ptr) @ stub QueryLocalUserServiceName @ stdcall QueryServiceConfig2A(long long ptr long ptr) advapi32.QueryServiceConfig2A @ stdcall QueryServiceConfig2W(long long ptr long ptr) advapi32.QueryServiceConfig2W @@ -185,7 +185,7 @@ @ stdcall RegisterServiceCtrlHandlerExA(str ptr ptr) advapi32.RegisterServiceCtrlHandlerExA @ stdcall RegisterServiceCtrlHandlerExW(wstr ptr ptr) advapi32.RegisterServiceCtrlHandlerExW @ stdcall RegisterServiceCtrlHandlerW(wstr ptr) advapi32.RegisterServiceCtrlHandlerW -@ stdcall RegisterTraceGuidsA(ptr ptr ptr long ptr str str ptr) advapi32.RegisterTraceGuidsA +@ stdcall RegisterTraceGuidsA(ptr ptr ptr long ptr str str ptr) ntdll.EtwRegisterTraceGuidsA @ stub ReleaseIdentityProviderEnumContext @ stub RemoveTraceCallback @ stub RpcClientCapabilityCheck @@ -198,11 +198,11 @@ @ stdcall StartServiceCtrlDispatcherA(ptr) advapi32.StartServiceCtrlDispatcherA @ stdcall StartServiceCtrlDispatcherW(ptr) advapi32.StartServiceCtrlDispatcherW @ stdcall StartServiceW(long long ptr) advapi32.StartServiceW -@ stdcall StartTraceA(ptr str ptr) advapi32.StartTraceA -@ stdcall StartTraceW(ptr wstr ptr) advapi32.StartTraceW -@ stdcall StopTraceW(int64 wstr ptr) advapi32.StopTraceW +@ stdcall StartTraceA(ptr str ptr) +@ stdcall StartTraceW(ptr wstr ptr) +@ stdcall StopTraceW(int64 wstr ptr) @ stub SubscribeServiceChangeNotifications @ stub TraceQueryInformation -@ stdcall TraceSetInformation(int64 long ptr long) advapi32.TraceSetInformation +@ stdcall TraceSetInformation(int64 long ptr long) @ stub UnsubscribeServiceChangeNotifications @ stub WaitServiceState diff --git a/dlls/sechost/trace.c b/dlls/sechost/trace.c new file mode 100644 index 00000000000..01733690ac8 --- /dev/null +++ b/dlls/sechost/trace.c @@ -0,0 +1,155 @@ +/* + * Event tracing API + * + * Copyright 1995 Sven Verdoolaege + * Copyright 1998 Juergen Schmied + * Copyright 2003 Mike Hearn + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" +#include "wmistr.h" +#include "evntrace.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(eventlog); + +/****************************************************************************** + * ControlTraceA (sechost.@) + */ +ULONG WINAPI ControlTraceA( TRACEHANDLE handle, const char *session, + EVENT_TRACE_PROPERTIES *properties, ULONG control ) +{ + FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(handle), debugstr_a(session), properties, control); + return ERROR_SUCCESS; +} + +/****************************************************************************** + * ControlTraceW (sechost.@) + */ +ULONG WINAPI ControlTraceW( TRACEHANDLE handle, const WCHAR *session, + EVENT_TRACE_PROPERTIES *properties, ULONG control ) +{ + FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(handle), debugstr_w(session), properties, control); + return ERROR_SUCCESS; +} + +/****************************************************************************** + * EnableTraceEx2 (sechost.@) + */ +ULONG WINAPI EnableTraceEx2( TRACEHANDLE handle, const GUID *provider, ULONG control, UCHAR level, + ULONGLONG match_any, ULONGLONG match_all, ULONG timeout, + ENABLE_TRACE_PARAMETERS *params ) +{ + FIXME("(%s, %s, %u, %u, %s, %s, %u, %p): stub\n", wine_dbgstr_longlong(handle), + debugstr_guid(provider), control, level, wine_dbgstr_longlong(match_any), + wine_dbgstr_longlong(match_all), timeout, params); + + return ERROR_SUCCESS; +} + +/****************************************************************************** + * QueryAllTracesA (sechost.@) + */ +ULONG WINAPI QueryAllTracesA( EVENT_TRACE_PROPERTIES **properties, ULONG count, ULONG *ret_count ) +{ + FIXME("(%p, %d, %p) stub\n", properties, count, ret_count); + + if (ret_count) *ret_count = 0; + return ERROR_SUCCESS; +} + +/****************************************************************************** + * QueryAllTracesW (sechost.@) + */ +ULONG WINAPI QueryAllTracesW( EVENT_TRACE_PROPERTIES **properties, ULONG count, ULONG *ret_count ) +{ + FIXME("(%p, %d, %p) stub\n", properties, count, ret_count); + + if (ret_count) *ret_count = 0; + return ERROR_SUCCESS; +} + +/****************************************************************************** + * StartTraceA (sechost.@) + */ +ULONG WINAPI StartTraceA( TRACEHANDLE *handle, const char *session, EVENT_TRACE_PROPERTIES *properties ) +{ + FIXME("(%p, %s, %p) stub\n", handle, debugstr_a(session), properties); + if (handle) *handle = 0xcafe4242; + return ERROR_SUCCESS; +} + +/****************************************************************************** + * StartTraceW (sechost.@) + */ +ULONG WINAPI StartTraceW( TRACEHANDLE *handle, const WCHAR *session, EVENT_TRACE_PROPERTIES *properties ) +{ + FIXME("(%p, %s, %p) stub\n", handle, debugstr_w(session), properties); + if (handle) *handle = 0xcafe4242; + return ERROR_SUCCESS; +} + +/****************************************************************************** + * StopTraceW (sechost.@) + */ +ULONG WINAPI StopTraceW( TRACEHANDLE handle, const WCHAR *session, EVENT_TRACE_PROPERTIES *properties ) +{ + FIXME("(%s, %s, %p) stub\n", wine_dbgstr_longlong(handle), debugstr_w(session), properties); + return ERROR_SUCCESS; +} + +/****************************************************************************** + * OpenTraceW (sechost.@) + */ +TRACEHANDLE WINAPI OpenTraceW( EVENT_TRACE_LOGFILEW *logfile ) +{ + static int once; + + if (!once++) FIXME("%p: stub\n", logfile); + SetLastError(ERROR_ACCESS_DENIED); + return INVALID_PROCESSTRACE_HANDLE; +} + +/****************************************************************************** + * ProcessTrace (sechost.@) + */ +ULONG WINAPI ProcessTrace( TRACEHANDLE *handles, ULONG count, FILETIME *start_time, FILETIME *end_time ) +{ + FIXME("%p %u %p %p: stub\n", handles, count, start_time, end_time); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +/****************************************************************************** + * CloseTrace (sechost.@) + */ +ULONG WINAPI CloseTrace( TRACEHANDLE handle ) +{ + FIXME("%s: stub\n", wine_dbgstr_longlong(handle)); + return ERROR_INVALID_HANDLE; +} + +/****************************************************************************** + * TraceSetInformation (sechost.@) + */ +ULONG WINAPI TraceSetInformation( TRACEHANDLE handle, TRACE_INFO_CLASS class, void *info, ULONG len ) +{ + FIXME("%s %d %p %d: stub\n", wine_dbgstr_longlong(handle), class, info, len); + return ERROR_CALL_NOT_IMPLEMENTED; +}