]> Savannah Git Hosting - gnulib.git/commitdiff
idpriv-drop: Handle large user and group ids.
authorCollin Funk <collin.funk1@gmail.com>
Wed, 26 Jun 2024 04:34:51 +0000 (21:34 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Wed, 26 Jun 2024 04:34:51 +0000 (21:34 -0700)
* lib/idpriv-drop.c (idpriv_drop): Use uid_t and gid_t instead of int.

ChangeLog
lib/idpriv-drop.c

index 359250daf22c80616be3fbea611b51ea65d85286..f10e0edb436035f2dc92b7c9daf912eea139827b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-06-25  Collin Funk  <collin.funk1@gmail.com>
+
+       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  <bruno@clisp.org>
 
        c-vazsprintf-gnu: Add tests.
index a14d3ba9a01d19cff37551baeb674ee168fb327e..3bc0d6f98c93c111d931963133dc12d0b4b690b7 100644 (file)
@@ -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