Bug 2556 - smbd dumps core on startup if guest account gid is small
Summary: smbd dumps core on startup if guest account gid is small
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.13
Hardware: Other All
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-29 09:31 UTC by chris loelke
Modified: 2006-04-14 14:59 UTC (History)
0 users

See Also:


Attachments

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 
http://samba.org/ftp/unpacked/junkcode/getgrouplist.c


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