Re: idpriv-drop: Handle large user and group ids.

2024-06-26 Thread Tim Rice
On Wed, 26 Jun 2024, Bruno Haible wrote: > The second patch makes the assumption that uid_t and gid_t are > at least 32-bits wide. I had written the code that way because on some > systems (SunOS 4 IIRC, older IRIX, and Linux [1]) uid_t and gid_t > had been 'unsigned short', and thus a comparison

Re: idpriv-drop: Handle large user and group ids.

2024-06-26 Thread Bruno Haible
Hi Collin, > I've committed these two patches adjusting idpriv-drop and > idpriv-droptemp which previously stored the result of getuid () and > getgid () in an 'int'. The first patch is obviously fine. The second patch makes the assumption that uid_t and gid_t are at least 32-bits wide. I had wr

Re: idpriv-drop: Handle large user and group ids.

2024-06-25 Thread Collin Funk
Collin Funk writes: > The implementation shall support one or more programming environments in > which the widths of blksize_t, pid_t, size_t, ssize_t, and suseconds_t > are no greater than the width of type long. Oops, I only quoted the part mentioning pid_t. Two other important parts: * nlink

idpriv-drop: Handle large user and group ids.

2024-06-25 Thread Collin Funk
/pubs.opengroup.org/onlinepubs/9699919799.2018edition/ >From 01f20d6346ca1faad35af98e55c602b5584b094c Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Tue, 25 Jun 2024 21:34:51 -0700 Subject: [PATCH 1/2] idpriv-drop: Handle large user and group ids. * lib/idpriv-drop.c (idpriv_drop): Use uid_