From 01f20d6346ca1faad35af98e55c602b5584b094c Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Tue, 25 Jun 2024 21:34:51 -0700 Subject: [PATCH] idpriv-drop: Handle large user and group ids. * lib/idpriv-drop.c (idpriv_drop): Use uid_t and gid_t instead of int. --- ChangeLog | 5 +++++ lib/idpriv-drop.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 359250daf2..f10e0edb43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-06-25 Collin Funk + + idpriv-drop: Handle large user and group ids. + * lib/idpriv-drop.c (idpriv_drop): Use uid_t and gid_t instead of int. + 2024-06-25 Bruno Haible c-vazsprintf-gnu: Add tests. diff --git a/lib/idpriv-drop.c b/lib/idpriv-drop.c index a14d3ba9a0..3bc0d6f98c 100644 --- a/lib/idpriv-drop.c +++ b/lib/idpriv-drop.c @@ -26,10 +26,10 @@ int idpriv_drop (void) { #if HAVE_GETUID - int uid = getuid (); + uid_t uid = getuid (); #endif #if HAVE_GETGID - int gid = getgid (); + gid_t gid = getgid (); #endif /* Drop the gid privilege first, because in some cases the gid privilege -- 2.39.5