www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/07/20/02:51:12

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
To: cygwin-developers AT sources DOT redhat DOT com
Subject: Re: login-1.3 can't work on the recent snapshots.
References: <s1su2e4mz1d DOT fsf AT jaist DOT ac DOT jp> <s1s7lai5b7i DOT fsf AT jaist DOT ac DOT jp>
<20000719141458 DOT D17938 AT cygnus DOT com> <3975FB88 DOT 5A96123E AT cygnus DOT com>
<20000719150450 DOT C18820 AT cygnus DOT com>
Mime-Version: 1.0 (generated by tm-edit 7.106)
From: Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
Date: 20 Jul 2000 15:49:13 +0900
In-Reply-To: Chris Faylor's message of Wed, 19 Jul 2000 15:04:50 -0400
Message-ID: <s1s66q15mae.fsf@jaist.ac.jp>
Lines: 43
X-Mailer: Gnus v5.3/Emacs 19.34

>>> On Wed, 19 Jul 2000 15:04:50 -0400
>>> Chris Faylor <cgf AT cygnus DOT com> said:

> >login-1.3 is still using `sexec..()' of course.
> 
> I'm not sure why it is a problem even for when child == myself,
> actually.

My problem is triggered by the following code.

spawn.cc:
546:      child->uid = USHRT_MAX;
547:      child->username[0] = '\0';
548:      child->psid = NULL;
(snip)
553:      rc = CreateProcessAsUser (hToken,
554:		       real_path,	/* image name - with full path */
555:		       one_line.buf,	/* what was passed to exec */
556:                                        /* process security attrs */
557:                       allow_ntsec && sid ? sec_user (sa_buf, sid)
558:                                          : &sec_all_nih,
559:                                        /* thread security attrs */
560:                       allow_ntsec && sid ? sec_user (sa_buf, sid)
561:                                          : &sec_all_nih,

shared.cc:
204: PSECURITY_ATTRIBUTES __stdcall
205: sec_user (PVOID sa_buf, PSID sid2, BOOL inherit)
206: {
(snip)
218:   if (myself->psid)
219:     CopySid (MAX_SID_LEN, sid, myself->psid);
220:   else if (! lookup_name (getlogin (), myself->logsrv, sid))
221:     return inherit ? &sec_none_nih : &sec_none;

myself->psid has been modified to NULL at the line 548 of
spawn.cc, so getlogin is invoked at the line 220. But it can't
return the user name because myself->username has been modified
to "" at the line 547 of spawn.cc.
____
  | AIST      Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
  | HOKURIKU  School of Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology

- Raw text -


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