Bug 2172949

Summary: glibc: sgetsgent_r does not implement ERANGE protocol compatible with sgetsgent [rhel-8.9]
Product: Red Hat Enterprise Linux 8 Reporter: Florian Weimer <fweimer>
Component: glibcAssignee: Patsy Griffin <pfrankli>
Status: VERIFIED --- QA Contact: Martin Coufal <mcoufal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.9CC: ashankar, codonell, dj, fweimer, glibc-bugzilla, mcoufal, pfrankli, qe-baseos-tools-bugs, sipoyare, skolosov
Target Milestone: rcKeywords: Bugfix, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glibc-2.28-227.el8 Doc Type: No Doc Update
Doc Text:
If this bug requires documentation, please select an appropriate Doc Type value.
Story Points: ---
Clone Of: 2172947 Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2172947    
Bug Blocks:    

Description Florian Weimer 2023-02-23 15:18:56 UTC
+++ This bug was initially created as a clone of Bug #2172947 +++

The sgetsgent function checks errno for ERANGE, but sgetsgent_r only returns ERANGE, but does not set errno to ERANGE. As a result, sgetsgent does not detect failure at all, and returns indicating success without filling in the struct sgrp result.

Upstream patch under review:

[PATCH] gshadow: Matching sgetsgent, sgetsgent_r ERANGE handling (bug 30151)
<https://sourceware.org/pipermail/libc-alpha/2023-February/145752.html>