Sorry; that patch was bogus. This one is not, though I still don't like that
it returns the wrong result:

diff --git a/gl/lib/mgetgroups.c b/gl/lib/mgetgroups.c
index e697013..b3a2a1a 100644
--- a/gl/lib/mgetgroups.c
+++ b/gl/lib/mgetgroups.c
@@ -94,6 +94,11 @@ mgetgroups (char const *username, gid_t gid, GETGROUPS_T
**groups)
            }
          g = h;
 
+          if (ng < 0 && max_n_groups <= N_GROUPS_INIT)
+            {
+                ng = max_n_groups;
+            }
+
          if (0 <= ng)
            {
              *groups = g;



_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to