NT Service Control Manager - was Re: Samba under Coherant and Macintosh

Luke Kenneth Casson Leighton lkcl at samba.org
Mon Dec 20 00:45:14 GMT 1999


On Mon, 20 Dec 1999, John E. Malmberg wrote:

> Luke Kenneth Casson Leighton <lkcl#samba.org> wrote:
> 
> 
> >> While a utility to emulate the WINDOWS NT Service manager may have a lot
> of
> >> uses, I do not see a strong need for it.  I would also want to greatly
> >> restrict what it was allowed to do by an independant means than the main
> >> init.d file.
> >
> >the plan would be that you would have to provide your own scripts, with a
> >start and stop option.
> 
> 
> Actually that does become an issue, as the first thing that the NT GUI
> service control manager is inquire each service as what commands it supports
> of the set Start, Stop, Pause, Continue.
> 
> The start command can also pass optional parameters also.
> 
> If it does not respond, and the process is running then a status of "not
> responding" or equivalent is returned for a zombie process.
> 
> One of the uses of this is on NT to see if a service has become a zombie.
> 
> So the script for the service would need to also be able to return this
> information, unless you fake it, and thus cripple the end functionality.

well that wouldpresumably require some sort of return code (which i
believe my rc.service script does) from the "start" command to be
translated into state information.

 
> Are you planning a full implementation for those services that can support
> it?  Or just restrict it to the Start and Stop functions, and assume if the
> process exists that it is not in a zombie state.

i plan, if there is enough demand to outweigh the voices that cry "nay,
you're a crazy fool and you're compromising unix security and going to
cause us [samba team] maintainability nightmares", to add a _minimum_ of
"start / stop" to administrators, via their own start / stop scripts (not
via rc.init or rc.d or whatever: you'd have to redirect your own scripts
to your own configuration setup on a per-box basis).

if there's anything else that can be thought of, and it's not too
horrible, then yes, i'd like to add it.

 
> 
> >of course, kill -TERM only works as root or as the user that started a
> >service, therefore you cannot just terminate services as an anonymous
> >user.
> 
> 
> As long as you have  proper mapping of the remote user name to the local
> username.

very true.  this of course was a given assumption.

> Obviously most of this has been solved.  The issue seems to be on how to
> best keep track of multiple connections and sessions, as per the other
> discussions. 

> The platform I am using will not support a lot of short lived
> spawned processes.

what do you mean, won't support.  this is at user-interface speed,
therefore are you talking about speed of fork()?

i'd like to do some sort of optimisation, such that if you receive a
NetServerGetInfo followefd immediately by a NetShareEnum (run SRVMGR.EXE
and pick a box, you'll see what i mean: all those dialog boxes are filled
in with NetServer* MSRPVC calls), then the srvsvcd spawned for the
Net5ServerGetInfo does not immediately die: it can then be used to service
the NetShareEnum.

i have some plans... :)



More information about the samba-technical mailing list