阅读背景:

如何使用C获取Unix文件的所有者

来源:互联网 

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




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: