Bug 2168 - utils/ntlm_auth.c type mismatch
utils/ntlm_auth.c type mismatch
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
All All
: P3 normal
: none
Assigned To: Tim Potter
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2004-12-17 00:48 UTC by Luke Mewburn
Modified: 2005-08-24 10:16 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Luke Mewburn 2004-12-17 00:48:23 UTC
negTokenInit_t.mechtypes is defined as
  const char **mechTypes;
yet utils/ntlm_auth.c::offer_gss_spnego_mechs() initializes it with:
  spnego.negTokenInit.mechTypes = SMB_XMALLOC_ARRAY(char *, 3)
This causes a compile error when the appropriate gcc warnings are enabled
(c.f., "char *" instead of "const char *")

The fix is trivial; use
  spnego.negTokenInit.mechTypes = SMB_XMALLOC_ARRAY(const char *, 3);

I can provide a patch if necessary
Comment 1 Tim Potter 2004-12-17 15:01:09 UTC
Fixed - thanks dude.
Comment 2 Gerald (Jerry) Carter 2005-08-24 10:16:49 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.