From: Jurgen V. G. <jur...@st...> - 2002-07-19 08:51:41
|
Hi, I am extending the service.exe application a little bit. My question: services.exe creates an event "SvcctrlStartEvent_A3725DX" to signal it's intialisation state. It seems I cannot open the event on a real NT platform, is this because the event was created with the security credentials of the system acount? (BTW I need to open this event in advapi32.OpenSCManager to check whether services.exe has initialized.) Jurgen |
From: Eric K. <ek...@rz...> - 2002-07-19 12:18:06
|
"Jurgen Van Gael" <jur...@st...> wrote: > I am extending the service.exe application a little bit. My question: > services.exe creates an event "SvcctrlStartEvent_A3725DX" to signal it's > intialisation state. It seems I cannot open the event on a real NT > platform, is this because the event was created with the security > credentials of the system acount? (BTW I need to open this event in > advapi32.OpenSCManager to check whether services.exe has initialized.) I am absolutely sure "SvcctrlStartEvent_A3725DX" is protected by a SecurityDescriptor which does not permit access to anything but services.exe and advapi.dll. Btw, what are you working on? I have done a little work on the communication between services and service.exe. Eric |
From: Jurgen V. G. <jur...@st...> - 2002-07-19 14:06:35
|
Hi Erik, Well I was extending the functionality of services.exe. It's "My" starting point to get more into the internals of ReactOS. Do you mind me working on this as this is currently within my reach? (I'd be more than happy if you could email me your work on the communication and I might even extend your work ...) Jurgen -----Original Message----- From: rea...@li... [mailto:rea...@li...] On Behalf Of Eric Kohl Sent: Friday, July 19, 2002 14:22 To: rea...@li... Subject: Re: [ros-kernel] Service.exe "Jurgen Van Gael" <jur...@st...> wrote: > I am extending the service.exe application a little bit. My question: > services.exe creates an event "SvcctrlStartEvent_A3725DX" to signal > it's intialisation state. It seems I cannot open the event on a real > NT platform, is this because the event was created with the security > credentials of the system acount? (BTW I need to open this event in > advapi32.OpenSCManager to check whether services.exe has initialized.) I am absolutely sure "SvcctrlStartEvent_A3725DX" is protected by a SecurityDescriptor which does not permit access to anything but services.exe and advapi.dll. Btw, what are you working on? I have done a little work on the communication between services and service.exe. Eric ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ reactos-kernel mailing list rea...@li... https://lists.sourceforge.net/lists/listinfo/reactos-kernel |
From: Eric K. <ek...@rz...> - 2002-07-19 21:11:51
|
"Jurgen Van Gael" <jur...@st...> wrote: > Well I was extending the functionality of services.exe. It's "My" > starting point to get more into the internals of ReactOS. Do you mind me > working on this as this is currently within my reach? (I'd be more than > happy if you could email me your work on the communication and I might > even extend your work ...) What part of services are you working on exactly? I'm currently working on the creation of service contol pipes and sending a start command to the first service. This also includes several modifications to lib/advapi32/service/sctrl.c. Eric |
From: Jurgen V. G. <jur...@st...> - 2002-07-19 22:35:31
|
Well, As I am picking up reactos again I was just working on extending the services.exe a bit more as a starting point. I was looking into communication etc but as you are working on it maybe that isn't such a good idea after all. Let me know if I should look into it further or if I should look into WINE stuff or something! Jurgen -----Original Message----- From: rea...@li... [mailto:rea...@li...] On Behalf Of Eric Kohl Sent: Friday, July 19, 2002 23:14 To: ReactOS Kernel Subject: Re: [ros-kernel] Service.exe "Jurgen Van Gael" <jur...@st...> wrote: > Well I was extending the functionality of services.exe. It's "My" > starting point to get more into the internals of ReactOS. Do you mind > me working on this as this is currently within my reach? (I'd be more > than happy if you could email me your work on the communication and I > might even extend your work ...) What part of services are you working on exactly? I'm currently working on the creation of service contol pipes and sending a start command to the first service. This also includes several modifications to lib/advapi32/service/sctrl.c. Eric ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ reactos-kernel mailing list rea...@li... https://lists.sourceforge.net/lists/listinfo/reactos-kernel |
From: Jarmo M. <ja...@mu...> - 2002-07-20 06:57:33
|
Hello, I think that you both can implement pieces of the services at the same time. I have some knowledge of services. I see services as following classes (I'm OO designer/programmer): - Service Control Program (SCP) - Service Control Manager Client (SCMC) - Service Control Manager Server (SCMS) - Service Process (SP) Service Control Program is the Services applet. This is clearly the easiest module to implement. Service Control Manager Client is the module which SCP uses and it's in advapi32.dll. This module implements client part. SCMC connects to SCMS by named pipe. Service Control Manager Server is the module where SCMC connects to and it's in services.exe. This module implement server part. SCMS starts the Service Process and creates a thread for service when the service is started. Service Process uses advapi32.dll too, but uses different APIs that SCP. One of the most difficult part, to me, is the pipe. What is the protocol? So, one could implement SCP, one could write both ends of the pipe, one could write SCMC and one could write SCMS. This could be easily splitted for four developers. At point I thought that I could implement them, but I don't have time. I checked ReactOS code and noticed that it wasn't implemented "at all". The code that were implemented started all services in the process at the same time. That's wrong. JMu ----- Original Message ----- From: "Jurgen Van Gael" <jur...@st...> To: <rea...@li...> Sent: Saturday, July 20, 2002 1:35 AM Subject: RE: [ros-kernel] Service.exe > Well, > > > As I am picking up reactos again I was just working on extending the > services.exe a bit more as a starting point. I was looking into > communication etc but as you are working on it maybe that isn't such a > good idea after all. Let me know if I should look into it further or if > I should look into WINE stuff or something! > > Jurgen > > -----Original Message----- > From: rea...@li... > [mailto:rea...@li...] On Behalf Of Eric > Kohl > Sent: Friday, July 19, 2002 23:14 > To: ReactOS Kernel > Subject: Re: [ros-kernel] Service.exe > > > > "Jurgen Van Gael" <jur...@st...> wrote: > > > > Well I was extending the functionality of services.exe. It's "My" > > starting point to get more into the internals of ReactOS. Do you mind > > me working on this as this is currently within my reach? (I'd be more > > than happy if you could email me your work on the communication and I > > might even extend your work ...) > > What part of services are you working on exactly? > > I'm currently working on the creation of service contol pipes and > sending a start command to the first service. This also includes several > modifications to lib/advapi32/service/sctrl.c. > > Eric > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf _______________________________________________ > reactos-kernel mailing list rea...@li... > https://lists.sourceforge.net/lists/listinfo/reactos-kernel > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > reactos-kernel mailing list > rea...@li... > https://lists.sourceforge.net/lists/listinfo/reactos-kernel > |
From: Eric K. <ek...@rz...> - 2002-07-20 13:07:03
|
"Jarmo Muukka" <ja...@mu...> wrote: Hi! > One of the most difficult part, to me, is the pipe. What is the > protocol? The protocol doesn't matter as long as our implementation behaves the same way as the original implementation. ;-) > So, one could implement SCP, one could write both ends of the > pipe, one could write SCMC and one could write SCMS. This could be > easily splitted for four developers. That might work if you have a well defined communication protocol, otherwise it doesn't work. > At point I thought that I could implement them, but I don't have > time. I checked ReactOS code and noticed that it wasn't > implemented "at all". The code that were implemented started all > services in the process at the same time. That's wrong. At present only service processes that constain a single service can be started. Services that share a process are not supported yet. Regards, Eric |
From: Jarmo M. <ja...@mu...> - 2002-07-20 13:22:44
|
Hello, The protocol will matter. Have you ever thought that Win NT and ReactOS services would have to communicate with each other? Say you have a ReactOS machine and you want to start service on Windows 2000 machine. ReactOS client part have to connect to W2K machine and W2K server part have to understand what client is asking and ros have to understand W2K replies. About working on with same thing as a group of programmers. This would be easy if you first design interfaces. Pipe has two ends and it clearly has interface on both ends. If they are first designed, both ends may write their code separately and modules that use the pipe ends could be programmed as well. JMu ----- Original Message ----- From: "Eric Kohl" <ek...@rz...> To: <rea...@li...> Sent: Saturday, July 20, 2002 4:11 PM Subject: Re: [ros-kernel] Service.exe > > "Jarmo Muukka" <ja...@mu...> wrote: > > Hi! > > > One of the most difficult part, to me, is the pipe. What is the > > protocol? > The protocol doesn't matter as long as our implementation behaves the same > way as the original implementation. ;-) > > > > So, one could implement SCP, one could write both ends of the > > pipe, one could write SCMC and one could write SCMS. This could be > > easily splitted for four developers. > That might work if you have a well defined communication protocol, otherwise > it doesn't work. > > > > At point I thought that I could implement them, but I don't have > > time. I checked ReactOS code and noticed that it wasn't > > implemented "at all". The code that were implemented started all > > services in the process at the same time. That's wrong. > At present only service processes that constain a single service can be > started. Services that share a process are not supported yet. > > > Regards, > Eric > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > reactos-kernel mailing list > rea...@li... > https://lists.sourceforge.net/lists/listinfo/reactos-kernel > |
From: Eric K. <ek...@rz...> - 2002-07-20 13:47:04
|
"Jarmo Muukka" <ja...@mu...> wrote: > The protocol will matter. Have you ever thought that Win NT and > ReactOS services would have to communicate with each other? Say > you have a ReactOS machine and you want to start service on > Windows 2000 machine. ReactOS client part have to connect to W2K > machine and W2K server part have to understand what client is > asking and ros have to understand W2K replies. The communication between a SCP and the SCM uses RPC, not pipes. The contol pipes are only used for communication between the SCM and the SPs. That's why the pipe protocol doesn't matter. Samba already implements the RPC protocol. When you use a local SCP to start a service on a remote machine, you tell the SCM on the remote machine to start the service. Eric |
From: Jarmo M. <ja...@mu...> - 2002-07-20 15:13:41
|
Does it go something like this? My SCP calls OpenSCManager in advapi32.dll. OpenSCManager calls "some procedure" on SCM on remote computer through RPC. Remote computer opens its database and return "some info" to the caller. If I have service open, my SCP calls StartService. StartService in advapi32.dll calls "some procedure" on remote computer through RPC. Remote computer's SCM starts the process (if not running) and creates/resumes a thread of the service. Now, where are the pipes needed for? I don't see need for pipes between SCM server and SP. They are in the same machine.... Now I got it, I think. StartServiceCtrlDispatcher is executing in address space of the service process. Services.exe runs in another address space. When services.exe receives a RPC, it communicates with SP (i.e. StartServiceCtrlDispatcher) with pipes. Does it? So you can implement it as you like. BTW, RPC is unknown territory to me. JMu ----- Original Message ----- From: "Eric Kohl" <ek...@rz...> To: <rea...@li...> Sent: Saturday, July 20, 2002 4:52 PM Subject: Re: [ros-kernel] Service.exe > > "Jarmo Muukka" <ja...@mu...> wrote: > > > > The protocol will matter. Have you ever thought that Win NT and > > ReactOS services would have to communicate with each other? Say > > you have a ReactOS machine and you want to start service on > > Windows 2000 machine. ReactOS client part have to connect to W2K > > machine and W2K server part have to understand what client is > > asking and ros have to understand W2K replies. > > The communication between a SCP and the SCM uses RPC, not pipes. The contol > pipes are only used for communication between the SCM and the SPs. That's > why the pipe protocol doesn't matter. Samba already implements the RPC > protocol. > > When you use a local SCP to start a service on a remote machine, you tell > the SCM on the remote machine to start the service. > > Eric > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > reactos-kernel mailing list > rea...@li... > https://lists.sourceforge.net/lists/listinfo/reactos-kernel > |
From: Jurgen V. G. <jur...@st...> - 2002-07-20 16:32:42
|
> If I have service open, my SCP calls StartService. > StartService in advapi32.dll calls "some procedure" on remote > computer through RPC. Remote computer's SCM starts the > process (if not running) and creates/resumes a thread of the service. > > Now, where are the pipes needed for? Correct me if I am mistaken, but services.exe communicates with services over a pipe. It send start, stop, pause, ... Messages over a pipe to the service. Jurgen |
From: Eric K. <ek...@rz...> - 2002-07-20 18:05:18
|
"Jarmo Muukka" <ja...@mu...> wrote: > Does it go something like this? My SCP calls OpenSCManager in > advapi32.dll. OpenSCManager calls "some procedure" on SCM on > remote computer through RPC. Remote computer opens its database > and return "some info" to the caller. > > If I have service open, my SCP calls StartService. StartService in > advapi32.dll calls "some procedure" on remote computer through > RPC. Remote computer's SCM starts the process (if not running) and > creates/resumes a thread of the service. Exactly! > Now, where are the pipes needed for? I don't see need for pipes > between SCM server and SP. They are in the same machine.... Now I > got it, I think. StartServiceCtrlDispatcher is executing in > address space of the service process. Services.exe runs in another > address space. When services.exe receives a RPC, it communicates > with SP (i.e. StartServiceCtrlDispatcher) with pipes. Does it? So > you can implement it as you like. Exactly! |
From: Eric K. <ek...@rz...> - 2002-07-20 13:07:02
|
"Jurgen Van Gael" <jur...@st...> wrote: Hello Jurgen! > As I am picking up reactos again I was just working on extending the > services.exe a bit more as a starting point. I was looking into > communication etc but as you are working on it maybe that isn't such a > good idea after all. Let me know if I should look into it further or if > I should look into WINE stuff or something! It is fine with me if you want to work on the service manager and services! I'll commit my changes to services.exe, eventlog.exe and advapi32.dll now. Please remember that this is work in progress. I will have a close look at the npfs driver and implement the tranceive request which is needed by TransactNamedPipe(). I use the eventlog service to implement the communication between the service manager and the service. To enable the eventlog service you will need to change the 'start' value of the eventlog service in the system.hiv file from 4 (disabled) to 2 (auto start). Regards, Eric |