summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorLuca Lorenzetto <lorenzetto-luca@ubuntu-it.org>2012-09-11 18:35:42 +0200
committerDavid Disseldorp <ddiss@samba.org>2012-09-12 00:07:28 +0200
commit4e595f4bf08489cb69e871093804b9069d63d9f5 (patch)
tree0dfdba2243845a8fe0aa7cabe5b972546f3d106b /nsswitch
parentdf5f962c60bb273c4759334ed6cc490d2a91d5ba (diff)
downloadsamba-4e595f4bf08489cb69e871093804b9069d63d9f5.tar.gz
nsswitch: fix crash on null pam change pw response
The function _pam_winbind_change_pwd crashes due to a null value passed to the function strcasecmp and denies to login via graphical login manager. Check for a null value before doing a strcasecmp. Bug-Ubuntu: https://bugs.launchpad.net/bugs/1003296 Bug: https://bugzilla.samba.org/show_bug.cgi?id=9013 Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Sep 12 00:07:28 CEST 2012 on sn-devel-104
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/pam_winbind.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index e3e9af19a32..fb84985155e 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -831,7 +831,7 @@ static bool _pam_winbind_change_pwd(struct pwb_context *ctx)
}
_pam_log(ctx, LOG_CRIT, "Received [%s] reply from application.\n", resp->resp);
- if (strcasecmp(resp->resp, "yes") == 0) {
+ if ((resp->resp != NULL) && (strcasecmp(resp->resp, "yes") == 0)) {
retval = true;
}