Title: #703: nss: sssd returns '/' for emtpy home directories
@thalman those other cases are already handled in the call right above your change.
So if those are handled homdir will arelady be "not null".
I think all you need to do is return ""; unconditionally when homedir is NULL.
Later if you need additional handling you can do that, but the point is that there is no
good reason to do the "right thing" only for files.
See the full comment at https://github.com/SSSD/sssd/pull/703#issuecomment-443779774