pam_winbind: Fix compiler warnings
authorBjörn Jacke <bj@sernet.de>
Fri, 16 Dec 2016 10:16:56 +0000 (11:16 +0100)
committerBjoern Jacke <bj@sernet.de>
Fri, 16 Dec 2016 15:22:32 +0000 (16:22 +0100)
Thanks to Stef Walter <stefw@gnome.org>

BUG: http://bugzilla.samba.org/show_bug.cgi?id=8888

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Dec 16 16:22:32 CET 2016 on sn-devel-144

nsswitch/pam_winbind.c

index 40f4f7a014f7c1e93f872a3e890757e736af6b29..b78c6bd93e26d0fb42f408337645373b33ae79b2 100644 (file)
@@ -667,7 +667,7 @@ static const char *_get_ntstatus_error_string(const char *nt_status_string)
 
 static int converse(const pam_handle_t *pamh,
                    int nargs,
-                   struct pam_message **message,
+                   const struct pam_message **message,
                    struct pam_response **response)
 {
        int retval;
@@ -690,7 +690,8 @@ static int _make_remark(struct pwb_context *ctx,
 {
        int retval = PAM_SUCCESS;
 
-       struct pam_message *pmsg[1], msg[1];
+       const struct pam_message *pmsg[1];
+       struct pam_message msg[1];
        struct pam_response *resp;
 
        if (ctx->flags & WINBIND_SILENT) {
@@ -843,7 +844,8 @@ static int wbc_auth_error_to_pam_error(struct pwb_context *ctx,
 #if defined(HAVE_PAM_RADIO_TYPE)
 static bool _pam_winbind_change_pwd(struct pwb_context *ctx)
 {
-       struct pam_message msg, *pmsg;
+       struct pam_message msg;
+       const struct pam_message *pmsg;
        struct pam_response *resp = NULL;
        int ret;
        bool retval = false;
@@ -2194,7 +2196,8 @@ static int _winbind_read_password(struct pwb_context *ctx,
         */
 
        {
-               struct pam_message msg[3], *pmsg[3];
+               struct pam_message msg[3];
+               const struct pam_message *pmsg[3];
                struct pam_response *resp;
                int i, replies;