Fixes from packstack

These fixes are used by packstack freeipa integration to get freeipa working.