From 89e4be39571799cf21634cfb677a7659cae38682 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sat, 29 Jun 2024 19:35:14 +0200 Subject: [PATCH] src/get_subid_owners.c: Use uid_t for holding UIDs (and GIDs) Suggested-by: "Serge E. Hallyn" Signed-off-by: Alejandro Colomar --- src/get_subid_owners.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/get_subid_owners.c b/src/get_subid_owners.c index 9fe07b621..1200bcb06 100644 --- a/src/get_subid_owners.c +++ b/src/get_subid_owners.c @@ -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); @@ -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");