Title: #520: DESKPROFILE: Fix 'Improper use of negative value'
This issue was found by Coverity. Similar as in code block before ret
must be set to errno to allow proper log messages since initial ret will
always be -1.
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/520/head:pr520
git checkout pr520