This is the mail archive of the
mailing list for the glibc project.
Re: Fwd: Bug#48120: gconv-modules would not be loaded properly whensetgid
- To: libc-alpha at sourceware dot cygnus dot com
- Subject: Re: Fwd: Bug#48120: gconv-modules would not be loaded properly whensetgid
- From: GOTO Masanori <gotom at debian dot or dot jp>
- Date: Sat, 06 Nov 1999 03:00:01 +0900
- Cc: Fumitoshi UKAI <ukai at debian dot or dot jp>, Kaz Sasayama <Kaz dot Sasayama at hypercore dot co dot jp>, Joel Klecker <espy at debian dot org>, 48120-forwarded at bugs dot debian dot org
- References: <firstname.lastname@example.org>
I've tested this problem, but I don't have a clue well.
From: Joel Klecker <email@example.com>
Subject: Fwd: Bug#48120: gconv-modules would not be loaded properly whensetgid
> [ `gconv-modules' is the Debian package which contains /usr/lib/gconv ]
> I assume this behavior is intentional, but is it truly necessary?
> >Subject: Bug#48120: gconv-modules would not be loaded properly when setgid
> >Reply-To: Fumitoshi UKAI <firstname.lastname@example.org>, email@example.com
> >Date: Sun, 24 Oct 1999 03:59:09 +0900
> >From: Fumitoshi UKAI <firstname.lastname@example.org>
> >To: email@example.com
> >Package: gconv-modules
> >Version: 2.1.2-5
> >Severity: important
> >In debian-users (for Japense) mailing-list, someone found
> >that gconv-modules would not be loaded if it was setgid program.
> >For examples, `LANG=ja_JP.eucJP /usr/games/same-gnome'
> >(in gnome-same-gnome package) would not show any menu strings
> >(of course, it should be Japanese).
> >It can be fixed by adding /usr/lib/gconv to /etc/ld.so.conf.
> >If /usr/lib/gconv in /etc/ld.so.conf, `LANG=ja_JP.eucJP /usr/games/same-gnome'
> >would works fine with Japanese menu strings.
> >However, I suspect this is bugs of glibc/icongdata/Makefile.
> >In this file, LDFLAGS for libJIS.so (and libKSC,libGB,libCNS) are
> >`-Wl,-soname,$(@F)' only, however others (such as EUC-JP.so) are
> >`-Wl,-rpath,'$$ORIGIN''. When we checked same-gnome with strace,
> >it find "EUC-JP.so", but failed to find "libJIS.so". So, it might be
> >fixed by adding -rpath,'$$ORIGIN' for LDFLAGS for libJIS.so,libKSC.so,
> >libGB.so and libCNS.so, but I've not yet checked it.
If setgid application start running, ld.so doesn't expand the $ORIGIN,
and applying to the name 'as it is' for the location of libJIS.so. it
is easy to observe using 'strace'. (Note that LANG environment are
I changed Makefile as same as described above, and tested,
but the result is the same badly.
> This solution was proposed in a separate message:
> >Subject: Bug#48120: $ORIGIN and setuid/setgid
> >Reply-To: Kaz Sasayama <Kaz.Sasayama@hypercore.co.jp>,
> > firstname.lastname@example.org
> >To: email@example.com
> >From: Kaz Sasayama <Kaz.Sasayama@hypercore.co.jp>
> >Date: 29 Oct 1999 17:21:03 +0900
> >I found this bug report in BTS. I hope this problem can be
> >fixed by replacing '$$ORIGIN' with $(gconvdir) in the
> >Makefile, or adding another rpath option with $(gconvdir).
> >Because $ORIGIN in rpath is expanded by glibc 2.1.2 only if
> >non-setuid and non-setgid, use of $ORIGIN is not appropriate
> >in this case.
> >Omitting $ORIGIN in rpath will not be a problem until
> >someone copies those modules and tries to replace underlying
> >libraries with his own versions, I hope.
I think that this method that replace '$$ORIGIN' with $(gnocdir)
is not a good idea because it is only 'quick hack', and be hidden
latent problem. But adding another rpath is considerable.
Department of Computational Intelligence and Systems Science,
Tokyo Institute of Technology.