delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/09/12/12:49:50

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 cygwin DOT com
Subject: Re: [RFA] A kinder, gentler check for /etc/{passwd,group} changes
References: <20010908225133 DOT A17336 AT redhat DOT com>
<20010909152458 DOT D937 AT cygbert DOT vinschen DOT de>
<1653247770 DOT 20010909175103 AT logos-m DOT ru>
<20010909163444 DOT E937 AT cygbert DOT vinschen DOT de>
<20010909121808 DOT B8059 AT redhat DOT com>
Mime-Version: 1.0 (generated by tm-edit 7.106)
From: Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
Date: 13 Sep 2001 01:49:32 +0900
In-Reply-To: Christopher Faylor's message of Sun, 9 Sep 2001 12:18:08 -0400
Message-ID: <s1sn140uzfn.fsf@jaist.ac.jp>
Lines: 54
X-Mailer: Gnus v5.3/Emacs 19.34

>>> On Sun, 9 Sep 2001 12:18:08 -0400
>>> Christopher Faylor <cgf AT redhat DOT com> said:

> The /etc/passwd and /etc/group rereading was one of the big reasons why I
> wanted to release 1.3.3.  It will quiet some mailing list traffic.
> 
> So, I'd like to get this into 1.3.3.

But I've never enjoyed this feature.

When I start vim and type `:w', it shows the following message
and chokes up.
~ $ vim /etc/passwd
Vim: Caught deadly signal SEGV

You can get the strace log from the following URL.
http://www.jaist.ac.jp/~fujieda/cygwin/vim.log.bz2
It shows:
- vim wrote /etc/passwd successfully.
- read_etc_passwd was invoked twice since the following message
  appears twice: _open: open (/etc/passwd, 0x20000)
- The signal 11 is triggered just after the first invocation.

I thought the following patch could solve this problem, but it
didn't completely. I was able to modify /etc/passwd with vim and
the patched cygwin1.dll, but bash hanged up when I typed a
command just after vim terminated.

You can get the strace log from the following URL.
http://www.jaist.ac.jp/~fujieda/cygwin/bash.log.bz2
I invoked `touch /etc/passwd' and then `ls' in the log.
I wasn't able to find the solution of the problem.

Index: pwdgrp.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/pwdgrp.h,v
retrieving revision 1.2
diff -u -p -r1.2 pwdgrp.h
--- pwdgrp.h	2001/09/09 21:57:44	1.2
+++ pwdgrp.h	2001/09/12 16:15:30
@@ -26,7 +26,7 @@ public:
   pwdgrp_check () : state (uninitialized) {}
   operator pwdgrp_state ()
     {
-      if (state != uninitialized && file_w32[0] && cygheap->etc_changed ())
+      if (state == loaded && file_w32[0] && cygheap->etc_changed ())
         {
           HANDLE h;
           WIN32_FIND_DATA data;

____
  | AIST      Kazuhiro Fujieda <fujieda AT jaist DOT ac DOT jp>
  | HOKURIKU  Center for 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