delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/22/09:10:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sun, 22 May 2005 15:10:44 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [patch] several new features for cygrunsrv
Message-ID: <20050522131044.GS2794@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <428CE837 DOT C00E288B AT dessent DOT net> <20050519203046 DOT GH2794 AT calimero DOT vinschen DOT de> <428FE303 DOT A897C7B3 AT dessent DOT net>
Mime-Version: 1.0
In-Reply-To: <428FE303.A897C7B3@dessent.net>
User-Agent: Mutt/1.4.2i

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 AT cygwin DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019