nsswitch: fix crash on null pam change pw response
authorLuca Lorenzetto <lorenzetto-luca@ubuntu-it.org>
Tue, 11 Sep 2012 16:35:42 +0000 (18:35 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 21 Sep 2012 07:44:44 +0000 (09:44 +0200)
commit5463fcf7dca60c902946f36437c034137d9078b0
treeee5bf546199591027df2acb188109a3ef7350e1e
parentf919d070b1dc9c210e9b402806372fd2f041b35a
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
(Desktop Managers (xdm, gdm, lightdm...) crashes with SIGSEGV in
_pam_winbind_change_pwd() when password is expiring)
(cherry picked from commit 47f2211f137688a7c46c4a38571a9f94e59dbf6a)
(cherry picked from commit 25bf057288d5e77c07a5ed3d3c3fb7f5f33f62b6)
nsswitch/pam_winbind.c