[SSSD] [ding-libs] Patches for #2267, build issue and tight loop