fix misuse of getpwuid_r in cuserid