Bug 2556 - smbd dumps core on startup if guest account gid is small
smbd dumps core on startup if guest account gid is small
Product: Samba 3.0
Classification: Unclassified
Component: File Services
Other All
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2005-03-29 09:31 UTC by chris loelke
Modified: 2006-04-14 14:59 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description chris loelke 2005-03-29 09:31:29 UTC
smb.conf file
guest account = chris
if 'chris' belongs to only ONE group a core dump on start up is
very likely.  I believe the core dump happens in the qsort function
which is in the remove_duplicate_gids functions.  It appears that the
qsort was sorting 'space junk' for the last entry.

If one looks at the logs, they are reporting one too many gids.

"remove_duplicate_gids: Enter 3 gids" even if there are only 2

My temporary fix in file system_smbd.c:

*grpcnt = ret;   // was  *grpcnt = ret + 1;

this is actually very similar to 

Hope this helps.
Comment 1 Gerald (Jerry) Carter 2006-04-14 14:59:27 UTC
Please retest against a current release and reopen if the issue is still present.