Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 28 Dec 2001 01:03:29 +0100 From: "Gerrit P. Haase" X-Mailer: The Bat! (v1.53t) Business Reply-To: "Gerrit P. Haase" Organization: Esse keine toten Tiere X-Priority: 3 (Normal) Message-ID: <80267895883.20011228010329@familiehaase.de> To: "H . Merijn Brand" CC: cygwin AT cygwin DOT com, perl5-porters AT perl DOT org Subject: Re: [ PATCH ] Cygwin groups.t (PLEASE CHECK) In-Reply-To: <20011227194217.7343.H.M.BRAND@hccnet.nl> References: <20011226142023 DOT C0D9 DOT H DOT M DOT BRAND AT hccnet DOT nl> <169152238006 DOT 20011226165552 AT familiehaase DOT de> <20011227194217 DOT 7343 DOT H DOT M DOT BRAND AT hccnet DOT nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hallo H, Am 2001-12-27 um 19:49 schriebst du: > On Wed 26 Dec 2001 16:55, "Gerrit P. Haase" wrote: >> Hallo H.Merijn, >> >> Am 2001-12-26 um 14:22 schriebst du: >> >> > I *do* however feel comfortable with this one. Passes on all my Cygwin systems >> > both NT and 2k, both English and Dutch. The catch doesn not seem to be true >> > anymore for modern cygwin systems. >> >> > --- t/op/groups.t.org Wed Dec 26 14:14:38 2001 >> > +++ t/op/groups.t Wed Dec 26 14:15:11 2001 >> > @@ -116,11 +116,7 @@ >> > >> > $pwgid = $( + 0; >> > ($pwgnam) = getgrgid($pwgid); >> > -if ($Config{myuname} =~ /^cygwin_nt/i) { # basegroup on CYGWIN_NT has id = 0. >> > - @basegroup{$pwgid,$pwgnam} = (0,0); >> > -} else { >> > - @basegroup{$pwgid,$pwgnam} = (1,1); >> > -} >> > +@basegroup{$pwgid,$pwgnam} = (1,1); >> > $seen{$pwgid}++; >> > >> > print "# pwgid = $pwgid, pwgnam = $pwgnam\n"; >> >> If you setup Cygwin and there are no /etc/passwd and no /etc/group >> files and (AFAIK) there is no /etc/postinstall/passwd-grp.bat.done >> file then setup.exe runs /bin/mkpasswd -l and /bin/mkgroup -l and then >> I get these entries in that files: >> >> $ cat /etc/passwd >> Jeder:*:0:0:,S-1-1-0:: >> SYSTEM:*:18:18:,S-1-5-18:: >> Administratoren:*:544:544:,S-1-5-32-544:: > This is wrong. I admit it happens, but it isn't a user ID it's a group ID, and > thusly belongs in /etc/group. >> .... >> >> $ cat /etc/group >> Jeder:S-1-1-0:0: >> SYSTEM:S-1-5-18:18: >> Administratoren:S-1-5-32-544:544: >> .... >> >> >> Jeder == Everyone == ... >> has GID 0 and UID 0 and that was never changed so it makes no difference >> whether you run cygwin-1.1.8 or 1.3.6. > What's the influence of using 'login' vs. just starting bash? Good question. e.g. `id' gives me the same result in both cases. I don't remember reading about it on the Cygwin list. We should ask Corinna, she is the `ntsec-queen' :-) >> This was the cause for the previous patch because it fails >> if there is checked for UID/GID 1/1. >> >> > One down two to go ... >> >> I will try to build now and then run both tests. > I saw your (disappointing) results. Why disappointing? We have just different ressults;) The MM_Cygwin.t failure was patched by chromatic (what a name;) basic.t isn't failing for me, I don't understand why your warnings.t doesn't fail... > Note that there is not a single reason to forbid the user to alter the > /etc/passwd and /etc/group files. I did it on my work PC to make files > extracted from tar archives use the same user/group names as on my unix > systems Well, if one changes his /etc/group or /etc/passwd file then the test may fail, I have no problems with this. > Differences I noted when tracing this fail > - gid (with name) did not appear in groups= > - different gID's with same name > - double gID's (with name) in groups= > One of the systems is a fresh install, no /etc/* tweakage, and I do not use > login. Just a plain bash.exe shortcut The default shortcut is one to x:\cygwin\cygwin.bat and there bash is called with `--login -i'. That is supported, if you modify the shortcut to point directely to bash then you have the choice: use --login -i here as well or don't use it, but we can only support one version. It should run clean without changing something and if one changes the default setup he should be prepared that there nay be some more faults then. > Why does my patch succeed on all my systems (NT and 2k), but fails on yours. Hmmm, I use a shortcut: `bash --login -i' to start the shell, this is the default in a fresh installed Cygwin. Maybe it is not the best way to use Cygwin and bash, but it is the default. I never changed the basic entries in the /etc/files, only added some users/groups now and then. Gerrit -- =^..^= mailto:gp AT familiehaase DOT de -- 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/