Hi,
attached are more patches that are related to running sssd as a
non-root. I split the functions to become a different user into a
separate module and provided unit tests using nss_wrapper and
uid_wrapper.
There is a separate Makefile.am for the cwrap-based tests, because it's
not easy (read: possible without a wrapper script) to run tests with a
custom environment. Some build systems, like cmake, allow that, but
autotools does not.