diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-06-09 17:29:18 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-06-09 17:29:18 +0000 |
commit | 0a7fe016a03184815b03fe92d50c58e67c8c05fc (patch) | |
tree | b9c25dd0fbbb71e08b2826e046b763facdcff8df /modules/pam_motd/pam_motd.c | |
parent | fa433b9e2fa1a00e13df36a8b709ffda9e3e715b (diff) | |
download | pam-0a7fe016a03184815b03fe92d50c58e67c8c05fc.tar.gz pam-0a7fe016a03184815b03fe92d50c58e67c8c05fc.tar.bz2 pam-0a7fe016a03184815b03fe92d50c58e67c8c05fc.zip |
Relevant BUGIDs: none
Purpose of commit: cleanup
Commit summary:
---------------
Fix all occurrence of dereferencing type-punned pointer will break
strict-aliasing rules warnings
Diffstat (limited to 'modules/pam_motd/pam_motd.c')
-rw-r--r-- | modules/pam_motd/pam_motd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/pam_motd/pam_motd.c b/modules/pam_motd/pam_motd.c index 3ff7a30e..8cdb633f 100644 --- a/modules/pam_motd/pam_motd.c +++ b/modules/pam_motd/pam_motd.c @@ -5,7 +5,7 @@ * * Based off of: * $Id$ - * + * * Written by Michael K. Johnson <johnsonm@redhat.com> 1996/10/24 * */ @@ -54,7 +54,8 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, int fd; char *mtmp=NULL; char *motd_path=NULL; - struct pam_conv *conversation; + const void *void_conv; + const struct pam_conv *conversation; struct pam_message message; struct pam_message *pmessage = &message; struct pam_response *resp = NULL; @@ -103,8 +104,9 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, close(fd); /* Use conversation function to give user contents of motd */ - if (pam_get_item(pamh, PAM_CONV, (const void **)&conversation) == - PAM_SUCCESS && conversation) { + if (pam_get_item(pamh, PAM_CONV, &void_conv) == + PAM_SUCCESS && void_conv) { + conversation = void_conv; conversation->conv(1, (const struct pam_message **)&pmessage, &resp, conversation->appdata_ptr); if (resp) |