Bug 3372

Summary: use of getpwnam_r and getpwuid_r is broken
Product: xorg Reporter: Daniel Stone <daniel>
Component: Lib/XlibAssignee: Daniel Stone <daniel>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: high    
Version: git   
Hardware: x86 (IA32)   
OS: other   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xos_r.h fix (proto/X11)
none
fixes users of this macro none

Description Daniel Stone 2005-05-23 07:01:07 UTC
The use of getpwnam_r and getpwuid_r in _Xgetpwnam and _Xgetpwuid is currently
broken.  These are four-argument functions on GNU systems, with the fourth
argument generally being optional.  However, it is not optional on the Hurd, so
_Xgetpwnam and _Xgetpwuid calls bomb.  The attached patches change _Xgetpwnam
and _Xgetpwuid to take four arguments, and all its users to work properly.

Patch from Debian, has been present in Debian XFree86 and Ubuntu XFree86/X.Org
packages ever since the first 4.3.0 packages.
Comment 1 Daniel Stone 2005-05-23 07:02:51 UTC
Created attachment 2748 [details] [review]
Xos_r.h fix (proto/X11)

this one changes the call
Comment 2 Daniel Stone 2005-05-23 07:04:11 UTC
Created attachment 2749 [details] [review]
fixes users of this macro

This patch fixes lib/X11/GetDflt.c, lib/Xp/XpJob.c and lib/Xt/Initialize.c.
Comment 3 Alan Coopersmith 2005-05-23 08:56:34 UTC
This patch was already suggested and rejected since it breaks other systems.
See the discussion in bugzilla 2577 about the correct way to fix this.

*** This bug has been marked as a duplicate of 2577 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.