summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2016-03-24 09:23:31 +0100
committerAndreas Schneider <asn@cryptomilk.org>2016-03-25 14:18:22 +0100
commit4c139e23e918c7a378953a3f9fc6ec7c927cf6f5 (patch)
tree0a958745a68f975c36a89123d4e838ec60e869f0 /nsswitch
parentfca78dddb428b89b01317e47a0db34124dda555e (diff)
downloadsamba-4c139e23e918c7a378953a3f9fc6ec7c927cf6f5.tar.gz
pam_winbind: Use the correct type to check the pam_parse() return code
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/pam_winbind.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index b83a2762092..745735fcd2d 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -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;