Bug 3781 - Incompatibel type definition for a variable
Incompatibel type definition for a variable
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
3.0.22
All All
: P3 normal
: none
Assigned To: Tim Potter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-17 05:35 UTC by Gordon Lack
Modified: 2006-05-17 20:56 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 Gordon Lack 2006-05-17 05:35:01 UTC
Problem:

The ngroups variable in struct connection_struct is defined as size_t in include/smb.h

It's only usage is in smbd/service.c as the second parameter in a call:

       get_current_groups(conn->gid, &conn->ngroups,&conn->groups);

however, the prototype of the get_current_groups function (smbd/sec_ctx.c) declares arg2 to be int *.

On some platforms (eg: OSF1) size_t is not an int (it's 8 bytes, not 4).  This produces a compile warning.  It may produce runtime errors.

Solution:
Change include/smb.h to declare ngroups to be int.
Comment 1 Jeremy Allison 2006-05-17 20:56:13 UTC
Thanks for reporting but this is already fixed in the SAMBA_3_0 tree and will be in 3.0.23.
Jeremy.