Bug 705 - Compiler warnings in auth-pam.c
Summary: Compiler warnings in auth-pam.c
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: PAM support (show other bugs)
Version: 3.7.1p1
Hardware: All Solaris
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-23 20:57 AEST by Paul Bolton
Modified: 2004-09-11 13:18 AEST (History)
0 users

See Also:


Attachments
Fix for compiler warnings (1.40 KB, patch)
2003-09-23 20:59 AEST, Paul Bolton
no flags Details | Diff
Attempt to fix warnings on other platforms too (2.15 KB, patch)
2004-01-08 06:40 AEDT, Darren Tucker
no flags Details | Diff
Update to -current (2.27 KB, patch)
2004-07-01 12:34 AEST, Darren Tucker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Bolton 2003-09-23 20:57:58 AEST
Compiler warnings in auth-pam.c when building on Solaris 8 HW02/02.
Comment 1 Paul Bolton 2003-09-23 20:59:11 AEST
Created attachment 455 [details]
Fix for compiler warnings

Needs testing against other PAM frameworks and Solaris 8 and prior without
Solaris 9 PAM backport patch.
Comment 2 Darren Tucker 2003-12-22 22:05:26 AEDT
On one hand, PAM RFC [1] does say those params are "void **".  On the other
hand, the patch causes warnings with (at least) Linux PAM (which has the "const").

[1] http://www.opengroup.org/tech/rfc/mirror-rfc/rfc86.0.txt
Comment 3 Darren Tucker 2004-01-08 06:40:16 AEDT
Created attachment 526 [details]
Attempt to fix warnings on other platforms too



We could do some preprocessor abuse to suppress the warnings on other platforms
or should we just live with them?
Comment 4 Darren Tucker 2004-07-01 12:34:50 AEST
Created attachment 674 [details]
Update to -current

This patch makes auth-pam.c match the prototypes defined by the PAM specs for
the conversation function and get_pam_item.  See OSF RFC 86.0[1] (A.1 and
appendix B) and and XSS0[2] (ss 5.1.2 and ch 6).

It will cause warnings similar to the following on platforms that don't match
the specs:

auth-pam.c: In function `sshpam_thread':
auth-pam.c:365: warning: passing arg 3 of `pam_get_item' from incompatible
pointer type
auth-pam.c:370: warning: assignment from incompatible pointer type
auth-pam.c: At top level:
auth-pam.c:460: warning: initialization from incompatible pointer type
auth-pam.c: In function `sshpam_init':
auth-pam.c:491: warning: passing arg 3 of `pam_get_item' from incompatible
pointer type
auth-pam.c: At top level:
auth-pam.c:842: warning: initialization from incompatible pointer type
auth-pam.c:908: warning: initialization from incompatible pointer type
auth-pam.c:1034: warning: initialization from incompatible pointer type

[1] http://www.opengroup.org/tech/rfc/mirror-rfc/rfc86.0.txt
[2] http://www.opengroup.org/onlinepubs/008329799/
Comment 5 Darren Tucker 2004-07-01 12:39:03 AEST
Applied, thanks.