You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The thread-safe functions to obtain user and group names are getpwuid_r() and getgrgid_r().
Note that it is never guaranteed that there exists a name for a given UID or GID. One example is that of an NFS file server, which might contain files owned by users that do not appear in any password database that it has access to.
I suggest two levels of API; a high-level message that answers the print string of the numeric ID if no name is found, and a lower-level message that signals an exception if not found.
A FileReference can answer its uid and gid, the numeric value of the userid. It would be quite useful to be able to resolve this into the username.
The text was updated successfully, but these errors were encountered: