summaryrefslogtreecommitdiff
path: root/modules/pam_nologin/pam_nologin.c
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2005-06-09 17:29:18 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2005-06-09 17:29:18 +0000
commit0a7fe016a03184815b03fe92d50c58e67c8c05fc (patch)
treeb9c25dd0fbbb71e08b2826e046b763facdcff8df /modules/pam_nologin/pam_nologin.c
parentfa433b9e2fa1a00e13df36a8b709ffda9e3e715b (diff)
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_nologin/pam_nologin.c')
-rw-r--r--modules/pam_nologin/pam_nologin.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/pam_nologin/pam_nologin.c b/modules/pam_nologin/pam_nologin.c
index bfd17753..1281e8ba 100644
--- a/modules/pam_nologin/pam_nologin.c
+++ b/modules/pam_nologin/pam_nologin.c
@@ -80,7 +80,8 @@ static int perform_check(pam_handle_t *pamh, struct opt_s *opts)
char *mtmp=NULL;
struct passwd *user_pwd;
- 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;
@@ -121,13 +122,15 @@ static int perform_check(pam_handle_t *pamh, struct opt_s *opts)
mtmp[st.st_size] = '\000';
/*
- * Use conversation function to give user contents
+ * Use conversation function to give user contents
* of /etc/nologin
*/
- if (pam_get_item(pamh, PAM_CONV, (const void **)&conversation)
- == PAM_SUCCESS && conversation && conversation->conv) {
- (void) conversation->conv(1,
+ if (pam_get_item(pamh, PAM_CONV, &void_conv)
+ == PAM_SUCCESS && void_conv &&
+ ((const struct pam_conv *)void_conv)->conv) {
+ conversation = void_conv;
+ (void) conversation->conv(1,
(const struct pam_message **)&pmessage,
&resp, conversation->appdata_ptr);