This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ PATCH ] Cygwin groups.t (PLEASE CHECK)


Hallo H,

Am 2001-12-27 um 19:49 schriebst du:

> On Wed 26 Dec 2001 16:55, "Gerrit P. Haase" <gp@familiehaase.de> 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@familiehaase.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]