OSDN Git Service

* grp.cc (pwdgrp::read_group): Generate more speaking group name
authorcorinna <corinna>
Thu, 9 Oct 2008 11:52:54 +0000 (11:52 +0000)
committercorinna <corinna>
Thu, 9 Oct 2008 11:52:54 +0000 (11:52 +0000)
if passwd gid exists under different gid in /etc/group.

winsup/cygwin/ChangeLog
winsup/cygwin/grp.cc

index 40346f6..907f46b 100644 (file)
@@ -1,5 +1,10 @@
 2008-10-09  Corinna Vinschen  <corinna@vinschen.de>
 
+       * grp.cc (pwdgrp::read_group): Generate more speaking group name
+       if passwd gid exists under different gid in /etc/group.
+
+2008-10-09  Corinna Vinschen  <corinna@vinschen.de>
+
        * path.cc (path_conv::is_binary): Always check for GetBinaryType.
        * syscalls.cc (rename): Fix test for just changing case of name on
        case insensitive filesystems.
index a007ae6..d9fe4f3 100644 (file)
@@ -84,7 +84,8 @@ pwdgrp::read_group ()
 
       cygheap->user.groups.pgsid.string (strbuf);
       if ((gr = internal_getgrsid (cygheap->user.groups.pgsid)))
-       strlcpy (group_name, gr->gr_name, sizeof (group_name));
+       snprintf (group_name, sizeof (group_name),
+                 "passwd/group_GID_clash(%lu/%lu)", myself->gid, gr->gr_gid);
       if (myself->uid == UNKNOWN_UID)
        strcpy (group_name, "mkpasswd"); /* Feedback... */
       snprintf (linebuf, sizeof (linebuf), "%s:%s:%lu:%s",