Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <3C4C3662.EBC091A@ieee.org>
Date: Mon, 21 Jan 2002 10:40:18 -0500
From: "Pierre A. Humblet" <Pierre.Humblet@ieee.org>
X-Mailer: Mozilla 4.73 [en] (WinNT; U)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: Corinna Vinschen <cygwin@cygwin.com>
Subject: Re: security.cc: bug report, question and suggestion
References: <3.0.5.32.20020120225521.007e14b0@pop.ne.mediaone.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

"Corinna Vinschen" wrote:
> 
> On Fri, Jan 18, 2002 at 07:46:03PM -0500, Pierre A. Humblet wrote:

> > Entry in passwd (note Cygwin name != Windows name)
> > exim:unused_by_nt/2000/xp:1002:1005:daemon,U-PHumblet\Mail,S-1-5-21-21273915
> > 03-1594901184-99485923-1002:/h
> > ome/Mail:/bin/bash
> >
> > /> cygrunsrv -I test -u mail -e CYGWIN=ntsec -p /a.exe
> > Enter password of user `.\mail':
> > Reenter, please:
> > /> cygrunsrv -S test
> > /> head /var/log/test.log
> > CYGWIN = ntsec USERNAME = UNDEF UID = 500 GID = 513 PID = 619  <==INCORRECT UID/GID
> 
> Operator error.  -u expects the Cygwin user name, not the Windows
> user name (it's a Cygwin application...).  The wrong UID is caused
> by your aforementioned observation that the getpwuid/getgrgid
> functions always return a default value :-(

Corinna, I just checked on NT. cygrunsrv accepts Cygwin and Windows
user names equally well and produces an incorrect UID if they differ.

Pierre

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

