Bug 10847 - getutmpx is missing in libc.so.6
Summary: getutmpx is missing in libc.so.6
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-26 16:05 UTC by Aurelien Jarno
Modified: 2014-07-01 05:33 UTC (History)
1 user (show)

See Also:
Host: s390-linux-gnu
Target: s390-linux-gnu
Build: s390-linux-gnu
Last reconfirmed:
fweimer: security-


Attachments
Patch to fix the problem (526 bytes, patch)
2009-10-26 16:06 UTC, Aurelien Jarno
Details | Diff
New patch (385 bytes, patch)
2009-10-26 17:26 UTC, Aurelien Jarno
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aurelien Jarno 2009-10-26 16:05:37 UTC
On 32-bit S390 systems, getutmpx@@GLIBC_2.9 is missing in libc.so.6, only
getutmpx@@GLIBC_2.1.1 is present. This is due to the compat code:

getutmpx is defined in sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c:
#define getutmpx __getutmpx
#include "sysdeps/gnu/getutmp.c"

and undefined in sysdeps/gnu/getutmp.c:
/* This is an ugly hack but we must not see the getutmpx declaration.  */
#define getutmpx XXXgetutmpx
#include <utmpx.h>
#undef getutmpx

The attached patch fixes the problem by not including sysdeps/gnu/getutmp.c, but
copying part of the code directly into
sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c
Comment 1 Aurelien Jarno 2009-10-26 16:06:01 UTC
Created attachment 4320 [details]
Patch to fix the problem
Comment 2 Jakub Jelinek 2009-10-26 16:17:09 UTC
What are the advantages of duplicating the code?
IMHO just add strong_alias (__getutmp, __getutmpx); after the include, and
possibly s/weak_alias/strong_alias/ also in the s390-32/getutmp.c.
Comment 3 Aurelien Jarno 2009-10-26 16:21:37 UTC
I didn't though about this possibility, I'll try this option and send a new patch
Comment 4 Aurelien Jarno 2009-10-26 17:26:11 UTC
Created attachment 4321 [details]
New patch

Please find a new patch attached.
Comment 5 Ulrich Drepper 2009-10-29 15:33:46 UTC
I fixed this in git but not with the patch attached here.