From owner-freebsd-emulation Mon Jun 23 19:44:19 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id TAA16230 for emulation-outgoing; Mon, 23 Jun 1997 19:44:19 -0700 (PDT) Received: from kithrup.com (kithrup.com [205.179.156.40]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id TAA16225 for ; Mon, 23 Jun 1997 19:44:17 -0700 (PDT) Received: (from sef@localhost) by kithrup.com (8.6.8/8.6.6) id TAA07504; Mon, 23 Jun 1997 19:44:12 -0700 Date: Mon, 23 Jun 1997 19:44:12 -0700 From: Sean Eric Fagan Message-Id: <199706240244.TAA07504@kithrup.com> To: emulation@FreeBSD.ORG, msagre@cactus.fi.uba.ar Subject: Re: ORACLE problem with ibcs2_getgroups Sender: owner-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk I have no idea what this code is trying to do. (The original code, that is.) Well, okay, I think I understand it now. However... according to the SCO system I just checked (which, admittedly, is not SysVr3.2, which is what the original iBCS2 stuff was based on): if getgroups() is called with a first parameter of 0, it is supposed to return the number of supplemental groups, although it won't set any. Your patch does not allow that. (For that matter, I don't think the old one did, either ;).) Instead, the code should check for SCARG(uap, gidsetsize) being 0, and, if so, it should set SCARG(&sa, gidsetsize) to NGROUPS_MAX * sizeof(gid_t). Without looking at it more, I think that Oracle is checking to see how much space it should allocate for the supplementary groups, but passing in a size of 0 is causing our getgroups() routine to return an error. But I haven't looked at it too closely yet, so I could be wrong. Sean.