Skip to content

Commit

Permalink
src/get_subid_owners.c: Use uid_t for holding UIDs (and GIDs)
Browse files Browse the repository at this point in the history
Suggested-by: "Serge E. Hallyn" <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
  • Loading branch information
alejandro-colomar committed Jun 29, 2024
1 parent 1f7c00b commit 89e4be3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/get_subid_owners.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static void usage(void)
int main(int argc, char *argv[])
{
int i, n;
long l;
uid_t u;
uid_t *uids;

log_set_progname(Prog);
Expand All @@ -33,13 +33,13 @@ int main(int argc, char *argv[])
usage();
}
if (argc == 3 && strcmp(argv[1], "-g") == 0) {
str2sl(&l, argv[2]);
n = subid_get_gid_owners(l, &uids);
str2i(uid_t, &u, argv[2]);
n = subid_get_gid_owners(u, &uids);
} else if (argc == 2 && strcmp(argv[1], "-h") == 0) {
usage();
} else {
str2sl(&l, argv[1]);
n = subid_get_uid_owners(l, &uids);
str2i(uid_t, &u, argv[1]);
n = subid_get_uid_owners(u, &uids);
}
if (n < 0) {
fprintf(stderr, "No owners found\n");
Expand Down

0 comments on commit 89e4be3

Please sign in to comment.