diff options
author | Florian Weimer <fweimer@redhat.com> | 2023-02-21 09:20:28 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2023-03-07 10:01:44 +0100 |
commit | 969e9733c7d17edf1e239a73fa172f357561f440 (patch) | |
tree | 0b7fc604681dafe3fa4f2eec0b60d2a20f833325 /gshadow/Makefile | |
parent | 8390014c2320f94ffd8a8f6088c10c1f64567954 (diff) | |
download | glibc-969e9733c7d17edf1e239a73fa172f357561f440.zip glibc-969e9733c7d17edf1e239a73fa172f357561f440.tar.gz glibc-969e9733c7d17edf1e239a73fa172f357561f440.tar.bz2 |
gshadow: Matching sgetsgent, sgetsgent_r ERANGE handling (bug 30151)
Before this change, sgetsgent_r did not set errno to ERANGE, but
sgetsgent only check errno, not the return value from sgetsgent_r.
Consequently, sgetsgent did not detect any error, and reported
success to the caller, without initializing the struct sgrp object
whose address was returned.
This commit changes sgetsgent_r to set errno as well. This avoids
similar issues in applications which only change errno.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'gshadow/Makefile')
-rw-r--r-- | gshadow/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gshadow/Makefile b/gshadow/Makefile index 796fbbf..a955245 100644 --- a/gshadow/Makefile +++ b/gshadow/Makefile @@ -26,7 +26,7 @@ headers = gshadow.h routines = getsgent getsgnam sgetsgent fgetsgent putsgent \ getsgent_r getsgnam_r sgetsgent_r fgetsgent_r -tests = tst-gshadow tst-putsgent tst-fgetsgent_r +tests = tst-gshadow tst-putsgent tst-fgetsgent_r tst-sgetsgent CFLAGS-getsgent_r.c += -fexceptions CFLAGS-getsgent.c += -fexceptions |