Set errno to 0 before getpwuid() and check it afterwards