I'm trying the get owner's name of a Unix file using C. The only method I have found is to use stat() and then getpwuid(stat.st_uid). But, it only returns the first user name with that uid, where users in the password file can have the same uid. Obviously, this is unacceptable and cannot be trusted.I'm trying the get owner's name of a Unix file