]> arthur.barton.de Git - bup.git/commit
Drop pwd/gid reentrant function variants for now
authorRob Browning <rlb@defaultvalue.org>
Tue, 30 Jun 2020 23:50:17 +0000 (18:50 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 5 Jul 2020 16:16:23 +0000 (11:16 -0500)
commitdd5351bd3ca731fa5caada713ce522af84edef58
tree86dac734f08eeaac6274ba4fffab7d9e07b4374e
parent64e04395957f148bd41d3506bc603a9b1122c7df
Drop pwd/gid reentrant function variants for now

From the POSIX pages, it sounded like _SC_GETPW_R_SIZE_MAX, etc. were
upper limits, but other docs, and observed behavior (reported ERANGE
failures) indicate that it's more likely they're just suggestions.  As
a result, we'd either need larger hard-coded buffers, or a
reallocate/retry loop if we kept them.

Instead, since we're not at all thread-safe and aren't likely to be
anytime soon, the dynamic allocations are just less efficient and more
complex, so back off to the non-reentrant flavors for now.

Thanks to kd7spq for reporting the problem and Johannes Berg for
tracking down the cause and help settling on this solution.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c