mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
- Fix gcc compilation issues
- Fix most ld linking issues. svn path=/trunk/; revision=18205
This commit is contained in:
parent
29b8aa245a
commit
5df400b823
7 changed files with 69 additions and 54 deletions
|
@ -6,8 +6,6 @@
|
||||||
<library>ntdll</library>
|
<library>ntdll</library>
|
||||||
<library>csrsrv</library>
|
<library>csrsrv</library>
|
||||||
<file>main.c</file>
|
<file>main.c</file>
|
||||||
<file>args.c</file>
|
|
||||||
<file>csr.rc</file>
|
|
||||||
</module>
|
</module>
|
||||||
<directory name="csrsrv">
|
<directory name="csrsrv">
|
||||||
<xi:include href="csrsrv/csrsrv.xml" />
|
<xi:include href="csrsrv/csrsrv.xml" />
|
||||||
|
|
|
@ -62,7 +62,7 @@ CsrCheckRequestThreads(VOID)
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
CsrApiRequestThread,
|
(PVOID)CsrApiRequestThread,
|
||||||
NULL,
|
NULL,
|
||||||
&hThread,
|
&hThread,
|
||||||
&ClientId);
|
&ClientId);
|
||||||
|
@ -550,7 +550,7 @@ CsrApiRequestThread(IN PVOID Parameter)
|
||||||
{
|
{
|
||||||
/* Get the information and check if it matches our thread */
|
/* Get the information and check if it matches our thread */
|
||||||
ClientDiedMsg = (PCLIENT_DIED_MSG)&ReceiveMsg;
|
ClientDiedMsg = (PCLIENT_DIED_MSG)&ReceiveMsg;
|
||||||
if (ClientDiedMsg->CreateTime.QuadPart = CsrThread->CreateTime.QuadPart)
|
if (ClientDiedMsg->CreateTime.QuadPart == CsrThread->CreateTime.QuadPart)
|
||||||
{
|
{
|
||||||
/* Reference the thread */
|
/* Reference the thread */
|
||||||
CsrThread->ReferenceCount++;
|
CsrThread->ReferenceCount++;
|
||||||
|
|
|
@ -1,38 +1,38 @@
|
||||||
LIBRARY CSRSRV
|
LIBRARY CSRSRV
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
CsrAddStaticServerThread
|
CsrAddStaticServerThread@12
|
||||||
CsrCallServerFromServer
|
CsrCallServerFromServer@8
|
||||||
CsrConnectToUser
|
CsrConnectToUser@0
|
||||||
CsrCreateProcess
|
CsrCreateProcess@24
|
||||||
CsrCreateRemoteThread
|
CsrCreateRemoteThread@8
|
||||||
CsrCreateThread
|
CsrCreateThread@12
|
||||||
CsrCreateWait
|
CsrCreateWait@24
|
||||||
CsrDebugProcess
|
CsrDebugProcess@4
|
||||||
CsrDebugProcessStop
|
CsrDebugProcessStop@4
|
||||||
CsrDereferenceProcess
|
CsrDereferenceProcess@4
|
||||||
CsrDereferenceThread
|
CsrDereferenceThread@4
|
||||||
CsrDereferenceWait
|
CsrDereferenceWait@4
|
||||||
CsrDestroyProcess
|
CsrDestroyProcess@8
|
||||||
CsrDestroyThread
|
CsrDestroyThread@4
|
||||||
CsrExecServerThread
|
CsrExecServerThread@8
|
||||||
CsrGetProcessLuid
|
CsrGetProcessLuid@8
|
||||||
CsrImpersonateClient
|
CsrImpersonateClient@4
|
||||||
CsrLockProcessByClientId
|
CsrLockProcessByClientId@8
|
||||||
CsrLockThreadByClientId
|
CsrLockThreadByClientId@8
|
||||||
CsrMoveSatisfiedWait
|
CsrMoveSatisfiedWait@8
|
||||||
CsrNotifyWait
|
CsrNotifyWait@16
|
||||||
CsrPopulateDosDevices
|
CsrPopulateDosDevices@0
|
||||||
CsrQueryApiPort
|
CsrQueryApiPort@0
|
||||||
CsrReferenceThread
|
CsrReferenceThread@4
|
||||||
CsrRevertToSelf
|
CsrRevertToSelf@0
|
||||||
CsrServerInitialization
|
CsrServerInitialization@8
|
||||||
CsrSetBackgroundPriority
|
CsrSetBackgroundPriority@4
|
||||||
CsrSetCallingSpooler
|
CsrSetCallingSpooler@4
|
||||||
CsrSetForegroundPriority
|
CsrSetForegroundPriority@4
|
||||||
CsrShutdownProcesses
|
CsrShutdownProcesses@8
|
||||||
CsrUnhandledExceptionFilter
|
CsrUnhandledExceptionFilter@8
|
||||||
CsrUnlockProcess
|
CsrUnlockProcess@4
|
||||||
CsrUnlockThread
|
CsrUnlockThread@4
|
||||||
CsrValidateMessageBuffer
|
CsrValidateMessageBuffer@16
|
||||||
CsrValidateMessageString
|
CsrValidateMessageString@8
|
||||||
|
|
|
@ -5,13 +5,14 @@
|
||||||
<define name="_DISABLE_TIDENTS" />
|
<define name="_DISABLE_TIDENTS" />
|
||||||
<define name="__USE_W32API" />
|
<define name="__USE_W32API" />
|
||||||
<library>ntdll</library>
|
<library>ntdll</library>
|
||||||
<file>debug.c</file>
|
<library>pseh</library>
|
||||||
<file>dllmain.c</file>
|
<library>intrlck</library>
|
||||||
|
<file>api.c</file>
|
||||||
<file>init.c</file>
|
<file>init.c</file>
|
||||||
<file>process.c</file>
|
<file>process.c</file>
|
||||||
<file>server.c</file>
|
<file>server.c</file>
|
||||||
<file>session.c</file>
|
<file>session.c</file>
|
||||||
<file>thread.c</file>
|
<file>thread.c</file>
|
||||||
<file>wait.c</file>
|
<file>wait.c</file>
|
||||||
<file>csrsrv.rc</file>
|
<pch>srv.h</pch>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -362,7 +362,7 @@ NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
CsrCreateLocalSystemSD(OUT PSECURITY_DESCRIPTOR *LocalSystemSd)
|
CsrCreateLocalSystemSD(OUT PSECURITY_DESCRIPTOR *LocalSystemSd)
|
||||||
{
|
{
|
||||||
SID_IDENTIFIER_AUTHORITY NtSidAuthority = SECURITY_NT_AUTHORITY;
|
SID_IDENTIFIER_AUTHORITY NtSidAuthority = {SECURITY_NT_AUTHORITY};
|
||||||
PSID SystemSid;
|
PSID SystemSid;
|
||||||
ULONG SidLength;
|
ULONG SidLength;
|
||||||
PSECURITY_DESCRIPTOR SecurityDescriptor;
|
PSECURITY_DESCRIPTOR SecurityDescriptor;
|
||||||
|
@ -460,9 +460,9 @@ NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
CsrGetDosDevicesSd(OUT PSECURITY_DESCRIPTOR DosDevicesSd)
|
CsrGetDosDevicesSd(OUT PSECURITY_DESCRIPTOR DosDevicesSd)
|
||||||
{
|
{
|
||||||
SID_IDENTIFIER_AUTHORITY WorldAuthority = SECURITY_WORLD_SID_AUTHORITY;
|
SID_IDENTIFIER_AUTHORITY WorldAuthority = {SECURITY_WORLD_SID_AUTHORITY};
|
||||||
SID_IDENTIFIER_AUTHORITY CreatorAuthority = SECURITY_CREATOR_SID_AUTHORITY;
|
SID_IDENTIFIER_AUTHORITY CreatorAuthority = {SECURITY_CREATOR_SID_AUTHORITY};
|
||||||
SID_IDENTIFIER_AUTHORITY NtSidAuthority = SECURITY_NT_AUTHORITY;
|
SID_IDENTIFIER_AUTHORITY NtSidAuthority = {SECURITY_NT_AUTHORITY};
|
||||||
PSID WorldSid, CreatorSid, AdminSid, SystemSid;
|
PSID WorldSid, CreatorSid, AdminSid, SystemSid;
|
||||||
UCHAR KeyValueBuffer[0x40];
|
UCHAR KeyValueBuffer[0x40];
|
||||||
PKEY_VALUE_PARTIAL_INFORMATION KeyValuePartialInfo;
|
PKEY_VALUE_PARTIAL_INFORMATION KeyValuePartialInfo;
|
||||||
|
@ -589,7 +589,7 @@ CsrGetDosDevicesSd(OUT PSECURITY_DESCRIPTOR DosDevicesSd)
|
||||||
SystemSid);
|
SystemSid);
|
||||||
|
|
||||||
/* Get the ACE back */
|
/* Get the ACE back */
|
||||||
Status = RtlGetAce(Dacl, 0, (PACE*)&Ace);
|
Status = RtlGetAce(Dacl, 0, (PVOID*)&Ace);
|
||||||
|
|
||||||
/* Add some flags to it for the Admin SID */
|
/* Add some flags to it for the Admin SID */
|
||||||
Ace->Header.AceFlags |= (OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE);
|
Ace->Header.AceFlags |= (OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE);
|
||||||
|
@ -601,7 +601,7 @@ CsrGetDosDevicesSd(OUT PSECURITY_DESCRIPTOR DosDevicesSd)
|
||||||
AdminSid);
|
AdminSid);
|
||||||
|
|
||||||
/* Get the ACE back */
|
/* Get the ACE back */
|
||||||
Status = RtlGetAce(Dacl, 1, (PACE*)&Ace);
|
Status = RtlGetAce(Dacl, 1, (PVOID*)&Ace);
|
||||||
|
|
||||||
/* Add some flags to it for the Creator SID */
|
/* Add some flags to it for the Creator SID */
|
||||||
Ace->Header.AceFlags |= (OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE);
|
Ace->Header.AceFlags |= (OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE);
|
||||||
|
@ -613,7 +613,7 @@ CsrGetDosDevicesSd(OUT PSECURITY_DESCRIPTOR DosDevicesSd)
|
||||||
CreatorSid);
|
CreatorSid);
|
||||||
|
|
||||||
/* Get the ACE back */
|
/* Get the ACE back */
|
||||||
Status = RtlGetAce(Dacl, 2, (PACE*)&Ace);
|
Status = RtlGetAce(Dacl, 2, (PVOID*)&Ace);
|
||||||
|
|
||||||
/* Add some flags to it for the SD */
|
/* Add some flags to it for the SD */
|
||||||
Ace->Header.AceFlags |= (OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE |
|
Ace->Header.AceFlags |= (OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE |
|
||||||
|
@ -662,7 +662,7 @@ CsrGetDosDevicesSd(OUT PSECURITY_DESCRIPTOR DosDevicesSd)
|
||||||
WorldSid);
|
WorldSid);
|
||||||
|
|
||||||
/* Get the ACE back */
|
/* Get the ACE back */
|
||||||
Status = RtlGetAce(Dacl, 2, (PACE*)&Ace);
|
Status = RtlGetAce(Dacl, 2, (PVOID*)&Ace);
|
||||||
|
|
||||||
/* Add some flags to it for the SD */
|
/* Add some flags to it for the SD */
|
||||||
Ace->Header.AceFlags |= (OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE |
|
Ace->Header.AceFlags |= (OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE |
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
#define NTOS_MODE_USER
|
#define NTOS_MODE_USER
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <winnt.h>
|
||||||
#include <ndk/ntndk.h>
|
#include <ndk/ntndk.h>
|
||||||
|
#include <helper.h>
|
||||||
|
|
||||||
/* CSR Header */
|
/* CSR Header */
|
||||||
#include <csr/server.h>
|
#include <csr/server.h>
|
||||||
|
@ -80,6 +82,13 @@ CsrLoadServerDll(
|
||||||
IN ULONG ServerId
|
IN ULONG ServerId
|
||||||
);
|
);
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
CsrServerInitialization(
|
||||||
|
ULONG ArgumentCount,
|
||||||
|
PCHAR Arguments[]
|
||||||
|
);
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
CsrCreateSessionObjectDirectory(IN ULONG SessionId);
|
CsrCreateSessionObjectDirectory(IN ULONG SessionId);
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define NTOS_MODE_USER
|
#define NTOS_MODE_USER
|
||||||
#include <ndk/ntndk.h>
|
#include <ndk/ntndk.h>
|
||||||
|
#include <csr/server.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
@ -50,12 +51,18 @@ CsrpSetDefaultProcessHardErrorMode (VOID)
|
||||||
sizeof(DefaultHardErrorMode));
|
sizeof(DefaultHardErrorMode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note: Standard entrypoint for Native C Programs.
|
||||||
|
* The OS backend (NtProcessStartup) which calls this routine is
|
||||||
|
* implemented in a CRT-like static library (much like mainCRTStartup).
|
||||||
|
* Do NOT manually add the NtProcessStartup entrypoint or anything else.
|
||||||
|
*/
|
||||||
int
|
int
|
||||||
_cdecl
|
_cdecl
|
||||||
main(int argc,
|
_main(int argc,
|
||||||
char *argv[],
|
char *argv[],
|
||||||
char *envp[],
|
char *envp[],
|
||||||
int DebugFlag)
|
int DebugFlag)
|
||||||
{
|
{
|
||||||
KPRIORITY BasePriority = (8 + 1) + 4;
|
KPRIORITY BasePriority = (8 + 1) + 4;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
Loading…
Reference in a new issue