This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] several new features for cygrunsrv


Hi Brian,

On May 21 18:40, Brian Dessent wrote:
> Corinna Vinschen wrote:
> 
> > I really like this patch, cool stuff.  However, I have two nits.
> > 
> > First, your patch adds new options, so it should also add some wording to
> > cygrunsrv.README.
> 
> Okay, here is a new patch.

Thanks :-)

> * ServiceType_desc has bitwise=true now, as I discovered that when you install
> with --interactive, both SERVICE_WIN32_OWN_PROCESS and
> SERVICE_INTERACTIVE_PROCESS are set, and it was showing (Unknown) before.
> * if both stdout_path and stderr_path are the same, they are combined into one
> line in the --verbose output, to save some space.

I'm wondering if that's a good idea.  Consider a script trying to
evaluate `cygrunsrv -L -V' output.  It sounds easier to check only
for "stdout path" and "stderr path" instead for also a third, combined
alternative.

That's the only question left.  Otherwise it looks perfect.

> #2 is more robust (i.e. it wouldn't falsely error if the user really did know
> what he's doing and is installing a service to run as his local user account
> with only user mode mounts.)  It's also more complicated though.  Do I presume
> correctly that cygwin will read the correct registry keys while impersonating,
> so that I can just seteuid() and then stat() the file trying to be installed as
> a service?

You won't be able to seteuid since not even the usual admin accounts have
the privilege to do so.  It should just check if the needed mount points
exist as system mount points.  Yes, it *is* possible that SYSTEM has its
own mount points, but you can really only test it by checking if some
registry keys under HKU/S-1-5-18/Software/Cygnus\ Solutions/Cygwin/mounts\ v2
exist.  And then that won't help for 2K3 where you first have to find
the SID of the sshd_server user and see if the user's profile is loaded
and all that.  Just too much of a hassle.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]