glibc/nss/nss_compat
Florian Weimer b0d3f7858c nss_compat: internal_end*ent may clobber errno, hiding ERANGE [BZ #25976]
During cleanup, before returning from get*_r functions, the end*ent
calls must not change errno.  Otherwise, an ERANGE error from the
underlying implementation can be hidden, causing unexpected lookup
failures.  This commit introduces an internal_end*ent_noerror
function which saves and restore errno, and marks the original
internal_end*ent function as warn_unused_result, so that it is used
only in contexts were errors from it can be handled explicitly.

Reviewed-by: DJ Delorie <dj@redhat.com>
(cherry picked from commit 790b8dda4455865cb8c3a47801f4304c1a43baf6)
2020-05-19 16:33:04 +02:00
..
compat-grp.c nss_compat: internal_end*ent may clobber errno, hiding ERANGE [BZ #25976] 2020-05-19 16:33:04 +02:00
compat-initgroups.c nss_compat: internal_end*ent may clobber errno, hiding ERANGE [BZ #25976] 2020-05-19 16:33:04 +02:00
compat-pwd.c nss_compat: internal_end*ent may clobber errno, hiding ERANGE [BZ #25976] 2020-05-19 16:33:04 +02:00
compat-spwd.c nss_compat: internal_end*ent may clobber errno, hiding ERANGE [BZ #25976] 2020-05-19 16:33:04 +02:00
nisdomain.c Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
nisdomain.h Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00