Bug 2643 - pam_winbind failes to compile on FreeBSD
pam_winbind failes to compile on FreeBSD
Status: CLOSED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: winbind
3.0.20
All FreeBSD
: P3 major
: none
Assigned To: Gerald (Jerry) Carter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-23 18:54 UTC by Timur Bakeyev
Modified: 2006-04-08 07:43 UTC (History)
0 users

See Also:


Attachments
Ugly fix to the problem (541 bytes, patch)
2005-04-30 17:54 UTC, Timur Bakeyev
no flags Details
Ugly fix to the problem (435 bytes, patch)
2005-04-30 17:55 UTC, Timur Bakeyev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur Bakeyev 2005-04-23 18:54:22 UTC
Hi!

Here is the problem:

Compiling nsswitch/pam_winbind.c with -fPIC -DPIC
nsswitch/pam_winbind.c: In function `_make_remark':
nsswitch/pam_winbind.c:89: warning: assignment discards qualifiers from
pointer target type
nsswitch/pam_winbind.c: In function `_pam_delete':
nsswitch/pam_winbind.c:292: error: syntax error before "void"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

nsswitch/pam_winbind.c: In function `_winbind_read_password':
nsswitch/pam_winbind.c:362: warning: assignment discards qualifiers from
pointer target type
nsswitch/pam_winbind.c:370: warning: assignment discards qualifiers from
pointer target type
nsswitch/pam_winbind.c:376: warning: assignment discards qualifiers from
pointer target type

The source of the problem lays in the wrong(recursive?) expansion of 
CONST_DISCARD macro. It' seems, that in addiotion to includes.h it is also
declared without any guardians in wb_common.c.

Unfortunatelly, guardians also didn't help... So, the problem is a bit more
cumbersome... 

When I deleted that macro declarations in the wb_common.c and moved them into
winbind_client.h.

That made the trick and now pam compiles noramflly!!! Except, that warnings
still remain.

Don't ask me why it worked - I suspect the way how one files are included into
other and necessirity to use local macroses, but not sure...
Comment 1 Timur Bakeyev 2005-04-30 17:54:39 UTC
Created attachment 1198 [details]
Ugly fix to the problem
Comment 2 Timur Bakeyev 2005-04-30 17:55:46 UTC
Created attachment 1199 [details]
Ugly fix to the problem

This fixes the problem with compilation, but I think, the right solution would
be to review the code...
Comment 3 Gerald (Jerry) Carter 2005-05-10 08:28:06 UTC
Timur,  I think this has been fixed by r6643

http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&rev=6643
Comment 4 Gerald (Jerry) Carter 2005-08-24 10:23:26 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.
Comment 5 Gerald (Jerry) Carter 2006-04-08 07:43:41 UTC
Cleaning up versions.  There was no 3.0.15 so leaving it in bugzilla 
is causing some confusion.  Moving these nuder 3.0.20.
Originally files against 3.0.15preX.