Bug 1416 - Samba only lists the first 32 members of each group
Samba only lists the first 32 members of each group
Product: Samba 3.0
Classification: Unclassified
Component: User/Group Accounts
All All
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2004-05-30 10:07 UTC by Jonas Olsson
Modified: 2005-08-24 10:24 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Olsson 2004-05-30 10:07:29 UTC
This bug was first reported to the samba-technical mailing list by Jerome
Borsboom <j.borsboom@erasmusmc.nl>.

In the function add_uid_to_array_unique() in the file
source/rpc_server/srv_samr_nt.c a limit is set on maximum number of uid's in the
list. This limit is set in groups_max() which has a default value of 32.

However, due to this limit the list of users in a group will get truncated to
this maximum. In usrmgr.exe this will show up as users not being member of a
group when they in fact are.

This bug is still present in the released 3.0.5pre1 and in Subversion. It seems
to have been introduced in revision 116 of
SAMBA_3_0/source/rpc_server/srv_samr_nt.c. Here is a quick patch to remove the
lines causing the bug (for Samba 3.0.5pre1):

----------------- snip -------------------
--- source/rpc_server/srv_samr_nt.c.orig        2004-05-28 21:23:04.000000000 +0200
+++ source/rpc_server/srv_samr_nt.c     2004-05-28 21:23:17.000000000 +0200
@@ -3245,9 +3245,6 @@
        int i;

-       if ((*num) >= groups_max())
-               return;
        for (i=0; i<*num; i++) {
                if ((*uids)[i] == uid)
----------------- snip -------------------

The patch above makes Samba behave correctly on our Fedora Core 1 and 2
Comment 1 Jonas Olsson 2004-08-27 13:26:34 UTC
This problem still seems to be present in Samba 3.0.6.
Comment 2 Volker Lendecke 2004-08-28 03:13:31 UTC
Fixed in svn revision 2093. Thanks!

Comment 3 Gerald (Jerry) Carter 2005-08-24 10:24:35 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.