Title: #407: Backport of PR#275 to SSSD-1.13
This patch is a backport of PR #275 for SSSD v1.13
Should only be merged after original PR is accepted.
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/407/head:pr407
git checkout pr407