Usually, passwd exits with an error if the current password is incorrect,
however, when using LDAP, it askes for password again. It causes hangs as
the passwd helper assumes that the password is correct. Let's prevent this
hangs using additional check for "incorrect" keyword.
Based on a patch from https://launchpad.net/bugs/607357 made by Ryan Tandy.
https://bugzilla.gnome.org/show_bug.cgi?id=786530
By passing the environment down to passwed rather than an empty one.
This means that passwd's PAM modules will be able to access the session
D-Bus, for the gnome-keyring PAM module to change the keyring password
for example.
https://bugzilla.gnome.org/show_bug.cgi?id=616703