Bug 2168 - utils/ntlm_auth.c type mismatch
Summary: utils/ntlm_auth.c type mismatch
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.9
Hardware: All All
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-17 00:48 UTC by Luke Mewburn
Modified: 2005-08-24 10:16 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 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);
instead.

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 (dead mail address) 2005-08-24 10:16:49 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.