Bug 3372 - use of getpwnam_r and getpwuid_r is broken
Summary: use of getpwnam_r and getpwuid_r is broken
Status: RESOLVED DUPLICATE of bug 2577
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: git
Hardware: x86 (IA32) other
: high normal
Assignee: Daniel Stone
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-23 07:01 UTC by Daniel Stone
Modified: 2005-05-22 15:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xos_r.h fix (proto/X11) (3.42 KB, patch)
2005-05-23 07:02 UTC, Daniel Stone
no flags Details | Splinter Review
fixes users of this macro (1.97 KB, patch)
2005-05-23 07:04 UTC, Daniel Stone
no flags Details | Splinter Review

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.