Bugzilla – Attachment 902 Details for
Bug 1033
Fix compile-time warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
silence warnings in auth-pam.c
openssh-pam-warn3.patch (text/plain), 2.95 KB, created by
Darren Tucker
on 2005-05-07 16:16:16 AEST
(
hide
)
Description:
silence warnings in auth-pam.c
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2005-05-07 16:16:16 AEST
Size:
2.95 KB
patch
obsolete
>Index: auth-pam.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/auth-pam.c,v >retrieving revision 1.121 >diff -u -p -r1.121 auth-pam.c >--- auth-pam.c 20 Jan 2005 02:29:51 -0000 1.121 >+++ auth-pam.c 3 May 2005 06:23:42 -0000 >@@ -56,6 +56,13 @@ RCSID("$Id: auth-pam.c,v 1.121 2005/01/2 > #include <pam/pam_appl.h> > #endif > >+/* OpenGroup RFC86.0 and XSSO specify no "const" on arguments */ >+#ifdef PAM_SUN_CODEBASE >+# define sshpam_const /* Solaris, HP-UX, AIX */ >+#else >+# define sshpam_const const /* LinuxPAM, OpenPAM */ >+#endif >+ > #include "auth.h" > #include "auth-pam.h" > #include "buffer.h" >@@ -290,7 +297,7 @@ import_environments(Buffer *b) > * Conversation function for authentication thread. > */ > static int >-sshpam_thread_conv(int n, struct pam_message **msg, >+sshpam_thread_conv(int n, sshpam_const struct pam_message **msg, > struct pam_response **resp, void *data) > { > Buffer buffer; >@@ -389,8 +396,10 @@ sshpam_thread(void *ctxtp) > char **env_from_pam; > u_int i; > const char *pam_user; >+ const char **ptr_pam_user = &pam_user; > >- pam_get_item(sshpam_handle, PAM_USER, (void **)&pam_user); >+ pam_get_item(sshpam_handle, PAM_USER, >+ (sshpam_const void **)ptr_pam_user); > environ[0] = NULL; > > if (sshpam_authctxt != NULL) { >@@ -482,7 +491,7 @@ sshpam_thread_cleanup(void) > } > > static int >-sshpam_null_conv(int n, struct pam_message **msg, >+sshpam_null_conv(int n, sshpam_const struct pam_message **msg, > struct pam_response **resp, void *data) > { > debug3("PAM: %s entering, %d messages", __func__, n); >@@ -492,7 +501,7 @@ sshpam_null_conv(int n, struct pam_messa > static struct pam_conv null_conv = { sshpam_null_conv, NULL }; > > static int >-sshpam_store_conv(int n, struct pam_message **msg, >+sshpam_store_conv(int n, sshpam_const struct pam_message **msg, > struct pam_response **resp, void *data) > { > struct pam_response *reply; >@@ -561,11 +570,12 @@ sshpam_init(Authctxt *authctxt) > { > extern char *__progname; > const char *pam_rhost, *pam_user, *user = authctxt->user; >+ const char **ptr_pam_user = &pam_user; > > if (sshpam_handle != NULL) { > /* We already have a PAM context; check if the user matches */ > sshpam_err = pam_get_item(sshpam_handle, >- PAM_USER, (void **)&pam_user); >+ PAM_USER, (sshpam_const void **)ptr_pam_user); > if (sshpam_err == PAM_SUCCESS && strcmp(user, pam_user) == 0) > return (0); > pam_end(sshpam_handle, sshpam_err); >@@ -881,7 +891,7 @@ do_pam_setcred(int init) > } > > static int >-sshpam_tty_conv(int n, struct pam_message **msg, >+sshpam_tty_conv(int n, sshpam_const struct pam_message **msg, > struct pam_response **resp, void *data) > { > char input[PAM_MAX_MSG_SIZE]; >@@ -1040,7 +1050,7 @@ free_pam_environment(char **env) > * display. > */ > static int >-sshpam_passwd_conv(int n, struct pam_message **msg, >+sshpam_passwd_conv(int n, sshpam_const struct pam_message **msg, > struct pam_response **resp, void *data) > { > struct pam_response *reply;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1033
: 902 |
903