]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pam_winbind: Use the correct type to check the pam_parse() return code
authorAndreas Schneider <asn@samba.org>
Thu, 24 Mar 2016 08:23:31 +0000 (09:23 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 25 Mar 2016 13:18:22 +0000 (14:18 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
nsswitch/pam_winbind.c

index b83a276209282238c0366eb0553729b3ddd21e31..745735fcd2dace4fd003a357bc5041af68cfa6b0 100644 (file)
@@ -551,6 +551,7 @@ static int _pam_winbind_init_context(pam_handle_t *pamh,
                                     struct pwb_context **ctx_p)
 {
        struct pwb_context *r = NULL;
+       int ctrl_code;
 
 #ifdef HAVE_GETTEXT
        textdomain_init();
@@ -567,11 +568,12 @@ static int _pam_winbind_init_context(pam_handle_t *pamh,
        r->flags = flags;
        r->argc = argc;
        r->argv = argv;
-       r->ctrl = _pam_parse(pamh, flags, argc, argv, type, &r->dict);
-       if (r->ctrl == -1) {
+       ctrl_code = _pam_parse(pamh, flags, argc, argv, type, &r->dict);
+       if (ctrl_code == -1) {
                TALLOC_FREE(r);
                return PAM_SYSTEM_ERR;
        }
+       r->ctrl = ctrl_code;
 
        *ctx_p = r;