MCPcopy Create free account
hub / github.com/RsyncProject/rsync / gid_to_group

Function gid_to_group

uidlist.c:127–141  ·  view source on GitHub ↗

turn a gid into a group name */

Source from the content-addressed store, hash-verified

125
126/* turn a gid into a group name */
127const char *gid_to_group(gid_t gid)
128{
129 const char *name = NULL;
130
131 if (namecvt_pid) {
132 id_t id = gid;
133 namecvt_call("gid", &name, &id);
134 } else {
135 struct group *grp = getgrgid(gid);
136 if (grp)
137 name = strdup(grp->gr_name);
138 }
139
140 return name;
141}
142
143/* Parse a user name or (optionally) a number into a uid */
144int user_to_uid(const char *name, uid_t *uid_p, BOOL num_ok)

Callers 3

add_gidFunction · 0.85
send_one_listFunction · 0.85
auth_serverFunction · 0.85

Calls 1

namecvt_callFunction · 0.85

Tested by

no test coverage detected