This is the mail archive of the cygwin 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: New passwd/group handling in Cygwin - test results and observations


On Feb 16 15:34, Corinna Vinschen wrote:
> On Feb 16 17:52, Andrey Repin wrote:
> > > Sorry, I can't provide an easy solution, and afaik this is documented.
> > 
> > I don't know, how it did not hit my head earlier, but now that I think about
> > it...
> > The fact `ls' does not print correct group names, but correctly translate
> > dates... eww, wait. There's something bad happens under the hood.
> > 
> > Please check this image: http://img513.imageshack.us/img513/43/jn7n.png
> > LANG is set (pre-set, before Cygwin tree start) to ru_RU.UTF-8 for mintty and
> > ru_RU.CP866 for console.
> > As you can see, existing group (i.e. - "Administrators") is properly
> > translated to chosen locale, which is not the case for group "ÐÑÑÑÑÑÑÐÑÐÑ".
> > 
> > The SID of the group "DAEMON2\ÐÑÑÑÑÑÑÐÑÐÑ" is S-1-5-21-1801674531-1644491937-1606980848-513
> > 
> > Cygwin show it as
> > -rwxr-xr-x    1 197612 197121    45597 ÐÐÑ 22  2013 xargs.exe
> > 
> > which matching your description for "Accounts from the local machine's user DB
> > (SAM)" (0x30000+513 =197121) (and yes, the leading part of the SID is matching
> > the one of the other users on this system), but the group is missing from
> > `wmic GROUP LIST' output. I presume, it was deleted at one point, or it is
> > remnants of the previous OS installation, transferred over with the disk to
> > this system. Either case explains the name of the group - "Missing" or
> > "Nonexistent". Means, it's name does not exist in current SAM database.
> 
> No, it's the local group with the RID 513, which exists on *all*
> machines, but is invisible, unless you call NetUserEnum, which
> enumerates it, or you call NetUserGetInfo with the localized name.
> 
> This group is called "None" in the english OS versions, "Kein" in
> the german version, "Aucun" in the french version, etc.  All local
> users accounts have this group invariably set as their primary group.
> 
> For some reason Microsoft decided ages ago, that this group does
> not show up in the GUI, and that it's not possible to change the primary
> group outside of domains.  Why that is, I have no idea.

Maybe I have a simple solution.  From your other mails I gather you
suceeded building your own Cygwin DLL.

If you apply this patch:

Index: dcrt0.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/dcrt0.cc,v
retrieving revision 1.453
diff -u -p -r1.453 dcrt0.cc
--- dcrt0.cc	10 Feb 2014 10:45:50 -0000	1.453
+++ dcrt0.cc	16 Feb 2014 15:15:44 -0000
@@ -929,14 +929,14 @@ dll_crt0_1 (void *)
   /* Allocate cygheap->fdtab */
   dtable_init ();
 
+  /* Set internal locale to the environment settings. */
+  initial_setlocale ();
+
   uinfo_init ();	/* initialize user info */
 
   /* Connect to tty. */
   tty::init_session ();
 
-  /* Set internal locale to the environment settings. */
-  initial_setlocale ();
-
   if (!__argc)
     {
       PWCHAR wline = GetCommandLineW ();

and rebuild your Cygwin DLL, does it make a difference?  In theory
it should work as expected now even with ru_RU.CP866.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgp6_0RUp3s1B.pgp
Description: PGP signature


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