Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: <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) Content-Type: text/plain; charset=US-ASCII From: Kazuhiro Fujieda 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: Lines: 43 X-Mailer: Gnus v5.3/Emacs 19.34 >>> On Wed, 19 Jul 2000 15:04:50 -0400 >>> Chris Faylor 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 | HOKURIKU School of Information Science o_/ 1990 Japan Advanced Institute of Science and Technology