initgroups() system call in smbd child process doesn't get
suppliementary group info from LDAP
Gerald (Jerry) Carter
jerry at samba.org
Wed Dec 17 16:58:09 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sorry Marco. I got tied up in the 3.0.1 release and
the session key bug. I'll jump back on this tomorrow.
jerry
Marco Zhang wrote:
> I modified smbd/server.c and changed the main() to the following:
>
> /*------------*/
> int main(int argc,char *argv[])
> {
> gid_t *gids, gid;
> int ngroups;
>
> gid = (gid_t) 513;
> initgroups("marco", gid);
> ngroups = getgroups(0, gids);
> printf("%d groups!\n",ngroups);
> return(0);
> }
>
> I have a user called "marco" stored in Directory Server with
> primary group id 513 and suplmentary group 512.
>
> I compiled above and run "../sbin/smbd -i". The result are:
>
> - If with Solaris 9 patch 112960-03, getgroups() returns 2 groups
>
> - If with Solaris 9 patch 112960-09, getgroups() returns only 1 group !?
>
> Well, the interesting thing is if I compile above simple code
> without other Samba source code context (standalone), it
> returns 2 group regardless what patch I used.
- --
----------------------------------------------------------------------
Hewlett-Packard ------------------------- http://www.hp.com
SAMBA Team ---------------------- http://www.samba.org
GnuPG Key ---- http://www.plainjoe.org/gpg_public.asc
"If we're adding to the noise, turn off this song" --Switchfoot (2003)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE/4IshIR7qMdg1EfYRAvgkAKCBmx5EA5wPr/H2w2EMRJNvYtZ9cQCg31YQ
5k7hF9984rRdawNKEjsshhY=
=xACE
-----END PGP SIGNATURE-----
More information about the samba-technical
mailing list