Bug 2172947

Summary: glibc: sgetsgent_r does not implement ERANGE protocol compatible with sgetsgent [rhel-9.3]
Product: Red Hat Enterprise Linux 9 Reporter: Florian Weimer <fweimer>
Component: glibcAssignee: Florian Weimer <fweimer>
Status: VERIFIED --- QA Contact: Sergey Kolosov <skolosov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.3CC: ashankar, codonell, dj, fweimer, markobri, pfrankli, sipoyare, skolosov
Target Milestone: rcKeywords: Bugfix, Patch, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glibc-2.34-67.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2172949 (view as bug list) 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:    
Bug Blocks: 2172949, 2188641    

Description Florian Weimer 2023-02-23 15:17:49 UTC
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>